File indexing completed on 2025-01-18 09:52:40
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef BOOST_TEST_TOOLS_DETAIL_IT_PAIR_HPP_112812GER
0016 #define BOOST_TEST_TOOLS_DETAIL_IT_PAIR_HPP_112812GER
0017
0018 #ifdef BOOST_TEST_NO_OLD_TOOLS
0019
0020 #include <boost/test/detail/suppress_warnings.hpp>
0021
0022
0023
0024 namespace boost {
0025 namespace test_tools {
0026 namespace tt_detail {
0027
0028
0029
0030
0031
0032 template<typename It>
0033 struct it_pair {
0034 typedef It const_iterator;
0035 typedef typename std::iterator_traits<It>::value_type value_type;
0036
0037 it_pair( It const& b, It const& e ) : m_begin( b ), m_size( 0 )
0038 {
0039 It tmp = b;
0040 while( tmp != e ) { ++m_size; ++tmp; }
0041 }
0042
0043 It begin() const { return m_begin; }
0044 It end() const { return m_begin + m_size; }
0045 size_t size() const { return m_size; }
0046
0047 private:
0048 It m_begin;
0049 size_t m_size;
0050 };
0051
0052
0053
0054 template<typename It>
0055 it_pair<It>
0056 make_it_pair( It const& b, It const& e ) { return it_pair<It>( b, e ); }
0057
0058
0059
0060 template<typename T>
0061 it_pair<T const*>
0062 make_it_pair( T const* b, T const* e ) { return it_pair<T const*>( b, e ); }
0063
0064
0065
0066 }
0067 }
0068 }
0069
0070 #include <boost/test/detail/enable_warnings.hpp>
0071
0072 #endif
0073
0074 #endif