1// Boost.Function library
2
3// Copyright (C) Douglas Gregor 2001-2005. Use, modification and
4// distribution is subject to the Boost Software License, Version
5// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6// http://www.boost.org/LICENSE_1_0.txt)
7
8// For more information, see http://www.boost.org
9
10#include <boost/function.hpp>
11
12static int bad_fn(float f) { return static_cast<int>(f); }
13
14void test()
15{
16 boost::function0<int> f1;
17 f1 = bad_fn;
18}
19

source code of boost/libs/function/test/function_test_fail2.cpp