diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 1d26356..b072b5e 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -71,3 +71,5 @@ run test_return_function.cpp return_function/0x : : : static : ret run test_return_function.cpp return_function/14 : : : shared $(check14) : return_function_shared_14 ; run test_return_function.cpp return_function/14 : : : static $(check14) : return_function_static_14 ; + +run quick.cpp ; diff --git a/test/quick.cpp b/test/quick.cpp new file mode 100644 index 0000000..d2d37d0 --- /dev/null +++ b/test/quick.cpp @@ -0,0 +1,21 @@ +// Copyright 2019 Peter Dimov + +// Use, modification and distribution is subject to the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +static int f( int x ) +{ + return x + 1; +} + +int main() +{ + boost::function fn( f ); + + BOOST_TEST_EQ( fn( 5 ), 6 ); + + return boost::report_errors(); +}