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
|
|
|
|
|
2003-11-23 16:17:24 +00:00
|
|
|
#include <boost/test/minimal.hpp>
|
2001-06-21 17:01:43 +00:00
|
|
|
#include <boost/function.hpp>
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
using namespace boost;
|
|
|
|
|
|
|
|
static int bad_fn(float f) { return static_cast<int>(f); }
|
|
|
|
|
|
|
|
int
|
|
|
|
test_main(int, char*[])
|
|
|
|
{
|
2002-10-08 02:32:38 +00:00
|
|
|
function0<int> f1;
|
2001-06-21 17:01:43 +00:00
|
|
|
f1 = bad_fn;
|
|
|
|
|
2005-12-30 02:27:13 +00:00
|
|
|
BOOST_ERROR("This should not have compiled.");
|
2001-06-21 17:01:43 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|