1/*
2 * Distributed under the Boost Software License, Version 1.0.
3 * (See accompanying file LICENSE_1_0.txt or copy at
4 * https://www.boost.org/LICENSE_1_0.txt)
5 *
6 * Copyright (c) 2023 Andrey Semashev
7 */
8/*!
9 * \file scope_exit_cond_def_cted_fptr.cpp
10 * \author Andrey Semashev
11 *
12 * \brief This file tests that \c scope_exit with a function pointer
13 * condition function object cannot be default-constructed.
14 */
15
16#include <boost/scope/scope_exit.hpp>
17#include "function_types.hpp"
18
19int main()
20{
21 int n = 0;
22 boost::scope::scope_exit< normal_func, bool (*)() > guard{ normal_func(n) };
23
24 return 0;
25}
26

source code of boost/libs/scope/test/compile_fail/scope_exit_cond_def_cted_fptr.cpp