Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/utility/test/none_test.cpp @ 47

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

updated boost from 1_33_1 to 1_34_1

File size: 788 bytes
Line 
1// Copyright 2007 Fernando Luis Cacciola Carballal.  Use, modification, and distribution
2// are subject to the Boost Software License, Version 1.0. (See
3// accompanying file LICENSE_1_0.txt or a copy at
4// http://www.boost.org/LICENSE_1_0.txt.)
5
6// See http://www.boost.org/libs/utility for documentation.
7
8// Boost test program for noost::none_t and boost::none
9
10// Test strategy contributed by Richard Smith
11
12#include <boost/optional/optional.hpp> // Test none.hpp is included with <optional.hpp>
13
14// Left undefined to cause a linker error if this overload is incorrectly selected.
15void verify_no_implicit_conversion_to_int ( int i ) ;
16
17void verify_no_implicit_conversion_to_int ( boost::optional<int> const& ) {}
18
19int main() 
20{
21  verify_no_implicit_conversion_to_int( boost::none );
22}
Note: See TracBrowser for help on using the repository browser.