Adobe Source Libraries
1.49.0
A collection of C++ libraries.
Loading...
Searching...
No Matches
check_container.hpp
Go to the documentation of this file.
1
/*
2
Copyright 2013 Adobe
3
Distributed under the Boost Software License, Version 1.0.
4
(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
*/
6
/**************************************************************************************************/
7
8
#include <
adobe/config.hpp
>
9
10
#include <adobe/check_container.hpp>
11
12
#include <boost/concept_check.hpp>
13
14
#include <adobe/implementation/swap.hpp>
15
#include <
adobe/test/check_regular.hpp
>
16
#include <iostream>
17
18
namespace
adobe
{
24
25
template
<
typename
T>
26
void
check_container
(
const
T& c) {
27
adobe::check_traversable
(c);
28
29
// Containers add the requirement that each element visited once to traversable
30
BOOST_CHECK_MESSAGE(c.size() == std::distance(c.begin(), c.end()),
"container size"
);
31
BOOST_CHECK_MESSAGE(d.size() == std::distance(d.begin(), d.end()),
"container size"
);
32
}
33
34
#if 0
35
//gcc always instantiates this
36
BOOST_TEST_CASE_TEMPLATE_FUNCTION
(check_containers, T)
37
{
38
check_container
(arbitrary_container_value<T>());
39
}
40
#endif
41
43
}
// namespace adobe
check_regular.hpp
config.hpp
adobe::check_container
void check_container(const T &c)
Definition
check_container.hpp:26
adobe::BOOST_TEST_CASE_TEMPLATE_FUNCTION
BOOST_TEST_CASE_TEMPLATE_FUNCTION(check_regulars, T)
Definition
check_regular.hpp:39
adobe::check_traversable
void check_traversable(const T &c)
Definition
check_traversable.hpp:22
adobe
Definition
class_template.hpp:7
adobe
test
check_container.hpp
Generated by
1.14.0