1 // (C) Copyright Gennadiy Rozental 2001.
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
6 // See http://www.boost.org/libs/test for the library home page.
10 // Version : $Revision: 74248 $
12 // Description : support for backward compatible collection comparison interface
13 // ***************************************************************************
15 #ifndef BOOST_TEST_TOOLS_DETAIL_IT_PAIR_HPP_112812GER
16 #define BOOST_TEST_TOOLS_DETAIL_IT_PAIR_HPP_112812GER
18 #ifdef BOOST_TEST_NO_OLD_TOOLS
20 #include <boost/test/detail/suppress_warnings.hpp>
22 //____________________________________________________________________________//
25 namespace test_tools {
28 // ************************************************************************** //
29 // ************** backward compatibility support ************** //
30 // ************************************************************************** //
34 typedef It const_iterator;
35 typedef typename std::iterator_traits<It>::value_type value_type;
37 it_pair( It const& b, It const& e ) : m_begin( b ), m_size( 0 )
40 while( tmp != e ) { ++m_size; ++tmp; }
43 It begin() const { return m_begin; }
44 It end() const { return m_begin + m_size; }
45 size_t size() const { return m_size; }
52 //____________________________________________________________________________//
56 make_it_pair( It const& b, It const& e ) { return it_pair<It>( b, e ); }
58 //____________________________________________________________________________//
62 make_it_pair( T const* b, T const* e ) { return it_pair<T const*>( b, e ); }
64 //____________________________________________________________________________//
66 } // namespace tt_detail
67 } // namespace test_tools
70 #include <boost/test/detail/enable_warnings.hpp>
72 #endif // BOOST_TEST_NO_OLD_TOOLS
74 #endif // BOOST_TEST_TOOLS_DETAIL_IT_PAIR_HPP_112812GER