#define BOOST_INCLUDE_MAIN #include #include using namespace std; using namespace boost; static int bad_fn(float f) { return static_cast(f); } int test_main(int, char*[]) { function f1; f1 = bad_fn; BOOST_CRITICAL_ERROR("This should not have compiled."); return 0; }