summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/phoenix/test/container/container_tests5a.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/boost/libs/phoenix/test/container/container_tests5a.cpp
parentInitial commit. (diff)
downloadceph-upstream.tar.xz
ceph-upstream.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/libs/phoenix/test/container/container_tests5a.cpp')
-rw-r--r--src/boost/libs/phoenix/test/container/container_tests5a.cpp56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/boost/libs/phoenix/test/container/container_tests5a.cpp b/src/boost/libs/phoenix/test/container/container_tests5a.cpp
new file mode 100644
index 000000000..983913a47
--- /dev/null
+++ b/src/boost/libs/phoenix/test/container/container_tests5a.cpp
@@ -0,0 +1,56 @@
+/*=============================================================================
+ Copyright (c) 2004 Angus Leeming
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#include "container_tests.hpp"
+
+std::deque<int> const build_deque()
+{
+ std::vector<int> const data = build_vector();
+ return std::deque<int>(data.begin(), data.end());
+}
+
+std::vector<int> const init_vector()
+{
+ typedef std::vector<int> int_vector;
+ int const data[] = { -4, -3, -2, -1, 0 };
+ int_vector::size_type const data_size = sizeof(data) / sizeof(data[0]);
+ return int_vector(data, data + data_size);
+}
+
+std::vector<int> const build_vector()
+{
+ typedef std::vector<int> int_vector;
+ static int_vector data = init_vector();
+ int_vector::size_type const size = data.size();
+ int_vector::iterator it = data.begin();
+ int_vector::iterator const end = data.end();
+ for (; it != end; ++it)
+ *it += size;
+ return data;
+}
+
+int
+main()
+{
+ BOOST_STATIC_ASSERT((!phx::stl::has_mapped_type<std::deque<int> >::value));
+ BOOST_STATIC_ASSERT((!phx::stl::has_key_type<std::deque<int> >::value));
+
+ std::deque<int> const data = build_deque();
+ test_assign(data);
+ test_assign2(data);
+ test_at(data);
+ test_back(data);
+ test_begin(data);
+ test_clear(data);
+ test_front(data);
+ test_empty(data);
+ test_end(data);
+ test_erase(data);
+ test_get_allocator(data);
+ return boost::report_errors();
+}
+
+