]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/phoenix/test/container/container_tests4b.cpp
1 /*=============================================================================
2 Copyright (c) 2004 Angus Leeming
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7 #include "container_tests.hpp"
8 #include <boost/static_assert.hpp>
10 std::vector
<int> const init_vector()
12 typedef std::vector
<int> int_vector
;
13 int const data
[] = { -4, -3, -2, -1, 0 };
14 int_vector::size_type
const data_size
= sizeof(data
) / sizeof(data
[0]);
15 return int_vector(data
, data
+ data_size
);
18 std::vector
<int> const build_vector()
20 typedef std::vector
<int> int_vector
;
21 static int_vector data
= init_vector();
22 int_vector::size_type
const size
= data
.size();
23 int_vector::iterator it
= data
.begin();
24 int_vector::iterator
const end
= data
.end();
25 for (; it
!= end
; ++it
)
33 BOOST_STATIC_ASSERT((!phx::stl::has_mapped_type
<std::vector
<int> >::value
));
34 BOOST_STATIC_ASSERT((!phx::stl::has_key_type
<std::vector
<int> >::value
));
36 std::vector
<int> const data
= build_vector();
37 test_get_allocator(data
);
47 return boost::report_errors();