// Copyright 2023 Peter Dimov // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt #include #include static int f() { return 1; } static int g() { return 2; } int main() { { boost::function fn; BOOST_TEST( !fn.contains( f ) ); BOOST_TEST( !fn.contains( g ) ); } { boost::function fn( f ); BOOST_TEST( fn.contains( f ) ); BOOST_TEST( !fn.contains( g ) ); } return boost::report_errors(); }