Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/function/test/function_test_fail2.cpp @ 33

Last change on this file since 33 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 614 bytes
Line 
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/test/minimal.hpp>
11#include <boost/function.hpp>
12
13using namespace std;
14using namespace boost;
15
16static int bad_fn(float f) { return static_cast<int>(f); }
17
18int
19test_main(int, char*[])
20{
21  function0<int> f1;
22  f1 = bad_fn;
23
24  BOOST_ERROR("This should not have compiled.");
25
26  return 0;
27}
Note: See TracBrowser for help on using the repository browser.