]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/assign/test/list_of_workaround.cpp
1 // Boost.Assign library
3 // Copyright Thorsten Ottosen 2003-2004. 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)
8 // For more information, see http://www.boost.org/libs/assign/
12 #include <boost/detail/workaround.hpp>
14 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
15 # pragma warn -8091 // suppress warning in Boost.Test
16 # pragma warn -8057 // unused argument argc/argv in Boost.Test
19 #include <boost/assign/list_of.hpp>
20 #include <boost/test/test_tools.hpp>
26 #include <boost/array.hpp>
31 using namespace boost
;
32 using namespace boost::assign
;
35 vector
<int> v
= list_of(1)(2)(3)(4).to_container( v
);
36 set
<int> s
= list_of(1)(2)(3)(4).to_container( s
);
37 map
<int,int> m
= map_list_of(1,2)(2,3).to_container( m
);
38 stack
<int> st
= list_of(1)(2)(3)(4).to_adapter( st
);
39 queue
<int> q
= list_of(1)(2)(3)(4).to_adapter( q
);
40 array
<int,4> a
= list_of(1)(2)(3)(4).to_array( a
);
41 const vector
<int> v2
= list_of(1).to_container( v2
);
42 const array
<int,1> a2
= list_of(1).to_array( a2
);
47 #include <boost/test/unit_test.hpp>
48 using boost::unit_test::test_suite
;
50 test_suite
* init_unit_test_suite( int argc
, char* argv
[] )
52 test_suite
* test
= BOOST_TEST_SUITE( "List Test Suite" );
54 test
->add( BOOST_TEST_CASE( &check_list_of
) );