2001-06-22 14:13:03 +00:00
|
|
|
// Boost.Function library
|
|
|
|
|
2005-12-30 02:27:13 +00:00
|
|
|
// Copyright (C) Douglas Gregor 2001-2005. Use, modification and
|
2003-10-01 04:10:37 +00:00
|
|
|
// 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)
|
2001-06-22 14:13:03 +00:00
|
|
|
|
|
|
|
// For more information, see http://www.boost.org
|
|
|
|
|
2001-06-21 17:01:43 +00:00
|
|
|
#include <boost/function.hpp>
|
|
|
|
|
|
|
|
static int bad_fn(float f) { return static_cast<int>(f); }
|
|
|
|
|
2018-11-13 19:43:12 +02:00
|
|
|
void test()
|
2001-06-21 17:01:43 +00:00
|
|
|
{
|
2018-11-13 19:43:12 +02:00
|
|
|
boost::function0<int> f1;
|
|
|
|
f1 = bad_fn;
|
2001-06-21 17:01:43 +00:00
|
|
|
}
|