mirror of
https://github.com/boostorg/scope.git
synced 2026-01-19 04:42:10 +00:00
Default- and value-constructed pointers to functions are not callable, and therefore are not accepted as default-constructible condition function objects and deleters. Closes https://github.com/Lastique/scope/issues/14.
24 lines
552 B
C++
24 lines
552 B
C++
/*
|
|
* Distributed under the Boost Software License, Version 1.0.
|
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
|
* https://www.boost.org/LICENSE_1_0.txt)
|
|
*
|
|
* Copyright (c) 2023 Andrey Semashev
|
|
*/
|
|
/*!
|
|
* \file unique_resource_del_def_cted_fptr.cpp
|
|
* \author Andrey Semashev
|
|
*
|
|
* \brief This file tests that \c unique_resource with a function pointer
|
|
* deleter cannot be default-constructed.
|
|
*/
|
|
|
|
#include <boost/scope/unique_resource.hpp>
|
|
|
|
int main()
|
|
{
|
|
boost::scope::unique_resource< int, void (*)(int) > ur;
|
|
|
|
return 0;
|
|
}
|