forked from boostorg/function
Initial Boost.Function commit
[SVN r10372]
This commit is contained in:
19
test/function_test_fail2.cpp
Normal file
19
test/function_test_fail2.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
#define BOOST_INCLUDE_MAIN
|
||||
#include <boost/test/test_tools.hpp>
|
||||
#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*[])
|
||||
{
|
||||
function<int> f1;
|
||||
f1 = bad_fn;
|
||||
|
||||
BOOST_CRITICAL_ERROR("This should not have compiled.");
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user