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>
16#include <iostream>
17
18namespace adobe {
24
25template <typename T>
26void check_container(const T& 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
36BOOST_TEST_CASE_TEMPLATE_FUNCTION(check_containers, T)
37{
38 check_container(arbitrary_container_value<T>());
39}
40#endif
41
43} // namespace adobe
void check_container(const T &c)
BOOST_TEST_CASE_TEMPLATE_FUNCTION(check_regulars, T)
void check_traversable(const T &c)