diff --git a/doc/mfc_atl.qbk b/doc/mfc_atl.qbk index 0511509..de2e225 100644 --- a/doc/mfc_atl.qbk +++ b/doc/mfc_atl.qbk @@ -41,7 +41,7 @@ BOOST_FOREACH (CList *theList, myArray) * Boost C++ Libraries Version 1.34.0 or later (no compilation required) * Visual C++ 7.1 or later (for MFC and ATL) - + [endsect] [section:mfc_ranges MFC Ranges] diff --git a/doc/portability.qbk b/doc/portability.qbk index aed3825..fabaafc 100644 --- a/doc/portability.qbk +++ b/doc/portability.qbk @@ -19,7 +19,7 @@ For maximum portability you should follow these guidelines: # use __const_begin__`()` and __const_end__`()` whenever your code by intention is read-only; this will also solve most rvalue problems, # do not rely on ADL: * if you overload functions, include that header before the headers in this library, - * put all overloads in namespace boost. + * put all overloads in namespace boost. diff --git a/doc/reference/semantics.qbk b/doc/reference/semantics.qbk index 335ab90..0710a99 100644 --- a/doc/reference/semantics.qbk +++ b/doc/reference/semantics.qbk @@ -128,7 +128,7 @@ ] [ [`size(x)`] - [`range_difference::type`] + [`range_size::type`] [`range_calculate_size(x)` which by default is `boost::end(x) - boost::begin(x)`. Users may supply alternative implementations by implementing `range_calculate_size(x)` so that it will be found via ADL] [constant time] ] diff --git a/doc/reference/synopsis.qbk b/doc/reference/synopsis.qbk index 381d77b..76719df 100644 --- a/doc/reference/synopsis.qbk +++ b/doc/reference/synopsis.qbk @@ -20,10 +20,10 @@ namespace boost template< class T > struct range_reference; - + template< class T > struct range_pointer; - + template< class T > struct range_category; @@ -92,11 +92,11 @@ namespace boost template< class T > typename range_reverse_iterator::type rend( const T& r ); - + // // Random Access Range functions // - + template< class T > typename range_difference::type size( const T& r ); @@ -106,42 +106,42 @@ namespace boost // template< class T > - typename range_iterator::type + typename range_iterator::type const_begin( const T& r ); template< class T > - typename range_iterator::type + typename range_iterator::type const_end( const T& r ); template< class T > - typename range_reverse_iterator::type + typename range_reverse_iterator::type const_rbegin( const T& r ); template< class T > - typename range_reverse_iterator::type + typename range_reverse_iterator::type const_rend( const T& r ); - + // // String utilities // - + template< class T > iterator_range< ... see below ... > as_literal( T& r ); - + template< class T > iterator_range< ... see below ... > as_literal( const T& r ); - + template< class T > iterator_range< typename range_iterator::type > as_array( T& r ); - + template< class T > iterator_range< typename range_iterator::type > as_array( const T& r ); -} // namespace 'boost' +} // namespace 'boost' `` [endsect] diff --git a/doc/reference/utilities.qbk b/doc/reference/utilities.qbk index 94d4699..25a7edb 100644 --- a/doc/reference/utilities.qbk +++ b/doc/reference/utilities.qbk @@ -40,23 +40,23 @@ namespace boost public: // construction, assignment template< class ForwardTraversalIterator2 > iterator_range( ForwardTraversalIterator2 Begin, ForwardTraversalIterator2 End ); - + template< class ForwardRange > iterator_range( ForwardRange& r ); - + template< class ForwardRange > iterator_range( const ForwardRange& r ); - + template< class ForwardRange > iterator_range& operator=( ForwardRange& r ); template< class ForwardRange > iterator_range& operator=( const ForwardRange& r ); - + public: // Forward Range functions iterator begin() const; iterator end() const; - + public: // convenience operator unspecified_bool_type() const; bool equal( const iterator_range& ) const; @@ -65,25 +65,25 @@ namespace boost iterator_range& advance_begin(difference_type n); iterator_range& advance_end(difference_type n); bool empty() const; - // for Random Access Range only: + // for Random Access Range only: reference operator[]( difference_type at ) const; value_type operator()( difference_type at ) const; size_type size() const; }; - + // stream output template< class ForwardTraversalIterator, class T, class Traits > - std::basic_ostream& + std::basic_ostream& operator<<( std::basic_ostream& Os, const iterator_range& r ); // comparison template< class ForwardTraversalIterator, class ForwardTraversalIterator2 > - bool operator==( const iterator_range& l, + bool operator==( const iterator_range& l, const iterator_range& r ); template< class ForwardTraversalIterator, class ForwardRange > - bool operator==( const iterator_range& l, + bool operator==( const iterator_range& l, const ForwardRange& r ); template< class ForwardTraversalIterator, class ForwardRange > @@ -91,11 +91,11 @@ namespace boost const iterator_range& r ); template< class ForwardTraversalIterator, class ForwardTraversalIterator2 > - bool operator!=( const iterator_range& l, + bool operator!=( const iterator_range& l, const iterator_range& r ); template< class ForwardTraversalIterator, class ForwardRange > - bool operator!=( const iterator_range& l, + bool operator!=( const iterator_range& l, const ForwardRange& r ); template< class ForwardTraversalIterator, class ForwardRange > @@ -103,23 +103,23 @@ namespace boost const iterator_range& r ); template< class ForwardTraversalIterator, class ForwardTraversalIterator2 > - bool operator<( const iterator_range& l, + bool operator<( const iterator_range& l, const iterator_range& r ); template< class ForwardTraversalIterator, class ForwardRange > - bool operator<( const iterator_range& l, + bool operator<( const iterator_range& l, const ForwardRange& r ); template< class ForwardTraversalIterator, class ForwardRange > bool operator<( const ForwardRange& l, const iterator_range& r ); - + // external construction template< class ForwardTraversalIterator > iterator_range< ForwardTraversalIterator > - make_iterator_range( ForwardTraversalIterator Begin, + make_iterator_range( ForwardTraversalIterator Begin, ForwardTraversalIterator End ); - + template< class ForwardRange > iterator_range< typename range_iterator::type > make_iterator_range( ForwardRange& r ); @@ -127,25 +127,25 @@ namespace boost template< class ForwardRange > iterator_range< typename range_iterator::type > make_iterator_range( const ForwardRange& r ); - + template< class Range > iterator_range< typename range_iterator::type > make_iterator_range( Range& r, typename range_difference::type advance_begin, typename range_difference::type advance_end ); - + template< class Range > iterator_range< typename range_iterator::type > - make_iterator_range( const Range& r, + make_iterator_range( const Range& r, typename range_difference::type advance_begin, typename range_difference::type advance_end ); - + // convenience template< class Sequence, class ForwardRange > Sequence copy_range( const ForwardRange& r ); - + } // namespace 'boost' -`` +`` If an instance of `iterator_range` is constructed by a client with two iterators, the client must ensure that the two iterators delimit a valid closed-open range [begin,end). @@ -177,7 +177,7 @@ It is worth noticing that the templated constructors and assignment operators al `` iterator_range make_iterator_range( Range& r, - typename range_difference::type advance_begin, + typename range_difference::type advance_begin, typename range_difference::type advance_end ); `` @@ -209,46 +209,46 @@ namespace boost template< class ForwardRange > class sub_range : public iterator_range< typename range_iterator::type > { - public: + public: typedef typename range_iterator::type iterator; typedef typename range_iterator::type const_iterator; typedef typename iterator_difference::type difference_type; - + public: // construction, assignment template< class ForwardTraversalIterator > sub_range( ForwardTraversalIterator Begin, ForwardTraversalIterator End ); template< class ForwardRange2 > sub_range( ForwardRange2& r ); - + template< class ForwardRange2 > sub_range( const Range2& r ); - + template< class ForwardRange2 > sub_range& operator=( ForwardRange2& r ); template< class ForwardRange2 > - sub_range& operator=( const ForwardRange2& r ); - - public: // Forward Range functions + sub_range& operator=( const ForwardRange2& r ); + + public: // Forward Range functions iterator begin(); const_iterator begin() const; iterator end(); - const_iterator end() const; - - public: // convenience + const_iterator end() const; + + public: // convenience value_type& front(); const value_type& front() const; value_type& back(); const value_type& back() const; - // for Random Access Range only: + // for Random Access Range only: value_type& operator[]( size_type at ); const value_type& operator[]( size_type at ) const; - + public: // rest of interface inherited from iterator_range }; - + } // namespace 'boost' `` diff --git a/doc/style.qbk b/doc/style.qbk index c6e5e34..2074ba6 100644 --- a/doc/style.qbk +++ b/doc/style.qbk @@ -13,7 +13,7 @@ Since ranges are characterized by a specific underlying iterator type, we get a * Readable Range * Writeable Range * Swappable Range - * Lvalue Range + * Lvalue Range * [*/Traversal/] category: * __single_pass_range__ * __forward_range__ @@ -25,7 +25,7 @@ Notice how we have used the categories from the __new_style_iterators__. Notice that an iterator (and therefore an range) has one [*/traversal/] property and one or more properties from the [*/value access/] category. So in reality we will mostly talk about mixtures such as * Random Access Readable Writeable Range -* Forward Lvalue Range +* Forward Lvalue Range By convention, we should always specify the [*/traversal/] property first as done above. This seems reasonable since there will only be one [*/traversal/] property, but perhaps many [*/value access/] properties. @@ -37,7 +37,7 @@ As another example, consider how we specify the interface of `std::sort()`. Algo template< class RandomAccessTraversalReadableWritableIterator > void sort( RandomAccessTraversalReadableWritableIterator first, RandomAccessTraversalReadableWritableIterator last ); -`` +`` For ranges the interface becomes @@ -45,6 +45,6 @@ For ranges the interface becomes template< class RandomAccessReadableWritableRange > void sort( RandomAccessReadableWritableRange& r ); `` - + [endsect] diff --git a/doc/upgrade.qbk b/doc/upgrade.qbk index 516ed11..e97f761 100644 --- a/doc/upgrade.qbk +++ b/doc/upgrade.qbk @@ -5,6 +5,12 @@ /] [section:upgrade Upgrade version of Boost.Range] +[section:upgrade_from_1_49 Upgrade from version 1.49] + +# __size__ now returns the type Rng::size_type if the range has size_type; +otherwise range_size::type is used. This is the distance type promoted to +an unsigned type. + [section:upgrade_from_1_45 Upgrade from version 1.45] # __size__ in addition to supporting __random_access_range__ now also supports extensibility via calls to the unqualified `range_calculate_size(rng)` function. diff --git a/include/boost/range/algorithm/equal.hpp b/include/boost/range/algorithm/equal.hpp old mode 100755 new mode 100644 index a3ebc29..4472bb1 --- a/include/boost/range/algorithm/equal.hpp +++ b/include/boost/range/algorithm/equal.hpp @@ -31,7 +31,7 @@ namespace boost IteratorCategoryTag1, IteratorCategoryTag2 ) { - do + while (true) { // If we have reached the end of the left range then this is // the end of the loop. They are equal if and only if we have @@ -46,7 +46,12 @@ namespace boost return false; // continue looping if and only if the values are equal - } while(*first1++ == *first2++); + if (*first1 != *first2) + break; + + ++first1; + ++first2; + } // Reaching this line in the algorithm indicates that a value // inequality has been detected. @@ -66,7 +71,7 @@ namespace boost IteratorCategoryTag1, IteratorCategoryTag2 ) { - do + while (true) { // If we have reached the end of the left range then this is // the end of the loop. They are equal if and only if we have @@ -81,7 +86,12 @@ namespace boost return false; // continue looping if and only if the values are equal - } while(pred(*first1++, *first2++)); + if (!pred(*first1, *first2)) + break; + + ++first1; + ++first2; + } // Reaching this line in the algorithm indicates that a value // inequality has been detected. @@ -182,7 +192,7 @@ namespace boost } } // namespace range - using range::equal; + using ::boost::range::equal; } // namespace boost #endif // include guard diff --git a/include/boost/range/algorithm/for_each.hpp b/include/boost/range/algorithm/for_each.hpp index 12c9d4d..4f5108d 100644 --- a/include/boost/range/algorithm/for_each.hpp +++ b/include/boost/range/algorithm/for_each.hpp @@ -14,7 +14,6 @@ #include #include #include -#include #include #if BOOST_WORKAROUND(BOOST_MSVC, == 1600) diff --git a/include/boost/range/algorithm_ext/copy_n.hpp b/include/boost/range/algorithm_ext/copy_n.hpp old mode 100755 new mode 100644 index ba7ad1c..f855441 --- a/include/boost/range/algorithm_ext/copy_n.hpp +++ b/include/boost/range/algorithm_ext/copy_n.hpp @@ -30,15 +30,15 @@ namespace boost /// /// \pre SinglePassRange is a model of the SinglePassRangeConcept /// \pre OutputIterator is a model of the OutputIteratorConcept -/// \pre 0 <= n < distance(rng) +/// \pre 0 <= n <= distance(rng) template< class SinglePassRange, class Size, class OutputIterator > inline OutputIterator copy_n(const SinglePassRange& rng, Size n, OutputIterator out) { BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept )); - BOOST_ASSERT( n < static_cast(boost::distance(rng)) ); + BOOST_ASSERT( n <= static_cast(::boost::distance(rng)) ); BOOST_ASSERT( n >= static_cast(0) ); - BOOST_DEDUCED_TYPENAME range_iterator::type source = boost::begin(rng); + BOOST_DEDUCED_TYPENAME range_iterator::type source = ::boost::begin(rng); for (Size i = 0; i < n; ++i, ++out, ++source) *out = *source; @@ -47,7 +47,7 @@ inline OutputIterator copy_n(const SinglePassRange& rng, Size n, OutputIterator } } // namespace range - using range::copy_n; + using ::boost::range::copy_n; } // namespace boost #endif // include guard diff --git a/include/boost/range/as_literal.hpp b/include/boost/range/as_literal.hpp index f67ead7..9ea144d 100644 --- a/include/boost/range/as_literal.hpp +++ b/include/boost/range/as_literal.hpp @@ -74,7 +74,7 @@ namespace boost #endif template< class T > - inline long is_char_ptr( T /* r */ ) + inline long is_char_ptr( const T& /* r */ ) { return 0L; } diff --git a/include/boost/range/counting_range.hpp b/include/boost/range/counting_range.hpp old mode 100755 new mode 100644 index 72733a2..b8e4e3a --- a/include/boost/range/counting_range.hpp +++ b/include/boost/range/counting_range.hpp @@ -18,7 +18,6 @@ #include #include #include -#include namespace boost { diff --git a/include/boost/range/detail/any_iterator.hpp b/include/boost/range/detail/any_iterator.hpp index 107dfd6..5705ff0 100644 --- a/include/boost/range/detail/any_iterator.hpp +++ b/include/boost/range/detail/any_iterator.hpp @@ -11,7 +11,6 @@ #define BOOST_RANGE_DETAIL_ANY_ITERATOR_HPP_INCLUDED #include -#include #include #include #include diff --git a/include/boost/range/detail/any_iterator_buffer.hpp b/include/boost/range/detail/any_iterator_buffer.hpp index 26c1420..2bb5d53 100644 --- a/include/boost/range/detail/any_iterator_buffer.hpp +++ b/include/boost/range/detail/any_iterator_buffer.hpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include namespace boost { diff --git a/include/boost/range/detail/join_iterator.hpp b/include/boost/range/detail/join_iterator.hpp index ce86467..bbdeec7 100644 --- a/include/boost/range/detail/join_iterator.hpp +++ b/include/boost/range/detail/join_iterator.hpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include namespace boost { diff --git a/include/boost/range/detail/size_type.hpp b/include/boost/range/detail/size_type.hpp old mode 100755 new mode 100644 index ec49f4d..78a60a4 --- a/include/boost/range/detail/size_type.hpp +++ b/include/boost/range/detail/size_type.hpp @@ -17,12 +17,19 @@ // missing partial specialization workaround. ////////////////////////////////////////////////////////////////////////////// -namespace boost +namespace boost { - namespace range_detail - { + namespace range_detail + { template< typename T > - struct range_size_type_; + struct range_size_type_ + { + template< typename C > + struct pts + { + typedef std::size_t type; + }; + }; template<> struct range_size_type_ @@ -33,36 +40,14 @@ namespace boost typedef BOOST_RANGE_DEDUCED_TYPENAME C::size_type type; }; }; + } - template<> - struct range_size_type_ - { - template< typename P > - struct pts - { - typedef std::size_t type; - }; - }; - - template<> - struct range_size_type_ - { - template< typename A > - struct pts - { - typedef std::size_t type; - }; - }; - - - } - template< typename C > class range_size { typedef typename range_detail::range::type c_type; public: - typedef typename range_detail::range_size_type_::BOOST_NESTED_TEMPLATE pts::type type; + typedef typename range_detail::range_size_type_::BOOST_NESTED_TEMPLATE pts::type type; }; } diff --git a/include/boost/range/has_range_iterator.hpp b/include/boost/range/has_range_iterator.hpp index 432efad..8046eb4 100644 --- a/include/boost/range/has_range_iterator.hpp +++ b/include/boost/range/has_range_iterator.hpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include namespace boost { diff --git a/include/boost/range/numeric.hpp b/include/boost/range/numeric.hpp old mode 100755 new mode 100644 index b01b73a..bfd1049 --- a/include/boost/range/numeric.hpp +++ b/include/boost/range/numeric.hpp @@ -40,7 +40,7 @@ namespace boost template< class SinglePassRange, class Value > inline Value accumulate( const SinglePassRange& rng, Value init ) { - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept )); + BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept )); return std::accumulate( boost::begin(rng), boost::end(rng), init ); } diff --git a/include/boost/range/size.hpp b/include/boost/range/size.hpp index 4b4eebe..6ae74d1 100644 --- a/include/boost/range/size.hpp +++ b/include/boost/range/size.hpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include namespace boost @@ -26,7 +26,7 @@ namespace boost namespace range_detail { template - inline BOOST_DEDUCED_TYPENAME range_difference::type + inline BOOST_DEDUCED_TYPENAME range_size::type range_calculate_size(const SinglePassRange& rng) { BOOST_ASSERT( (boost::end(rng) - boost::begin(rng)) >= 0 && @@ -36,7 +36,7 @@ namespace boost } template - inline BOOST_DEDUCED_TYPENAME range_difference::type + inline BOOST_DEDUCED_TYPENAME range_size::type size(const SinglePassRange& rng) { #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ diff --git a/include/boost/range/size_type.hpp b/include/boost/range/size_type.hpp index 8c184f8..c6fb54b 100644 --- a/include/boost/range/size_type.hpp +++ b/include/boost/range/size_type.hpp @@ -16,11 +16,13 @@ #endif #include - +#include #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #include #else +#include +#include #include #include #include @@ -33,36 +35,44 @@ namespace boost ////////////////////////////////////////////////////////////////////////// // default ////////////////////////////////////////////////////////////////////////// - - template< typename C > + + template + class has_size_type + { + typedef char no_type; + struct yes_type { char dummy[2]; }; + + template + static yes_type test(BOOST_DEDUCED_TYPENAME C::size_type x); + + template + static no_type test(Arg x); + + public: + static const bool value = sizeof(test(0)) == sizeof(yes_type); + }; + + template struct range_size + { + typedef BOOST_DEDUCED_TYPENAME make_unsigned< + BOOST_DEDUCED_TYPENAME range_difference::type + >::type type; + }; + + template + struct range_size< + C, + BOOST_DEDUCED_TYPENAME enable_if, void>::type + > { typedef BOOST_DEDUCED_TYPENAME C::size_type type; }; - - ////////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////////// - - template< typename Iterator > - struct range_size< std::pair > - { - typedef std::size_t type; - }; - - ////////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////////// - - template< typename T, std::size_t sz > - struct range_size< T[sz] > - { - typedef std::size_t type; - }; + } template< class T > - struct range_size : + struct range_size : detail::range_size { }; @@ -70,7 +80,7 @@ namespace boost struct range_size : detail::range_size { }; - + } // namespace boost #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION diff --git a/test/adl_conformance.cpp b/test/adl_conformance.cpp index 2d7f290..277c183 100644 --- a/test/adl_conformance.cpp +++ b/test/adl_conformance.cpp @@ -172,9 +172,9 @@ void check_adl_conformance() BOOST_CHECK_EQUAL( boost_test::begin( r6 ), global_namespace ); } -#include +#include -using boost::unit_test_framework::test_suite; +using boost::unit_test::test_suite; test_suite* init_unit_test_suite( int argc, char* argv[] ) { diff --git a/test/algorithm_test/for_each.cpp b/test/algorithm_test/for_each.cpp index 2ef51bf..701d676 100644 --- a/test/algorithm_test/for_each.cpp +++ b/test/algorithm_test/for_each.cpp @@ -44,7 +44,7 @@ namespace boost BOOST_CHECK_EQUAL( boost::udistance(rng), result_fn.invocation_count() ); fn_t result_fn2 = boost::for_each(boost::make_iterator_range(rng), fn_t(rng)); - BOOST_CHECK_EQUAL( boost::udistance(rng), result_fn.invocation_count() ); + BOOST_CHECK_EQUAL( boost::udistance(rng), result_fn2.invocation_count() ); // Test the constant version const SinglePassRange& cref_rng = rng; diff --git a/test/begin.cpp b/test/begin.cpp index eb745c2..bbc11c1 100644 --- a/test/begin.cpp +++ b/test/begin.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include namespace mock_std { @@ -104,12 +104,12 @@ namespace } } -using boost::unit_test_framework::test_suite; +using boost::unit_test::test_suite; -boost::unit_test_framework::test_suite* +boost::unit_test::test_suite* init_unit_test_suite( int argc, char* argv[] ) { - boost::unit_test_framework::test_suite* test = BOOST_TEST_SUITE( "Range Test Suite - begin() ADL namespace barrier" ); + boost::unit_test::test_suite* test = BOOST_TEST_SUITE( "Range Test Suite - begin() ADL namespace barrier" ); test->add( BOOST_TEST_CASE( &test_range_begin ) ); diff --git a/test/compat2.cpp b/test/compat2.cpp index 1a5359c..2874c04 100644 --- a/test/compat2.cpp +++ b/test/compat2.cpp @@ -53,9 +53,9 @@ void compat1() iterator_of< std::vector >::type i = v.begin(); } -#include +#include -using boost::unit_test_framework::test_suite; +using boost::unit_test::test_suite; test_suite* init_unit_test_suite( int argc, char* argv[] ) { diff --git a/test/compat3.cpp b/test/compat3.cpp old mode 100755 new mode 100644 index 00987e4..5249c58 --- a/test/compat3.cpp +++ b/test/compat3.cpp @@ -53,9 +53,9 @@ void compat1() iterator_of< std::vector >::type i = v.begin(); } -#include +#include -using boost::unit_test_framework::test_suite; +using boost::unit_test::test_suite; test_suite* init_unit_test_suite( int argc, char* argv[] ) { diff --git a/test/end.cpp b/test/end.cpp index e3383c3..3e989ff 100644 --- a/test/end.cpp +++ b/test/end.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include namespace mock_std { @@ -104,12 +104,12 @@ namespace } } -using boost::unit_test_framework::test_suite; +using boost::unit_test::test_suite; -boost::unit_test_framework::test_suite* +boost::unit_test::test_suite* init_unit_test_suite( int argc, char* argv[] ) { - boost::unit_test_framework::test_suite* test = BOOST_TEST_SUITE( "Range Test Suite - end() ADL namespace barrier" ); + boost::unit_test::test_suite* test = BOOST_TEST_SUITE( "Range Test Suite - end() ADL namespace barrier" ); test->add( BOOST_TEST_CASE( &test_range_end_adl_avoidance ) ); diff --git a/test/extension_size.cpp b/test/extension_size.cpp index 856f87d..b6f15cd 100644 --- a/test/extension_size.cpp +++ b/test/extension_size.cpp @@ -40,7 +40,7 @@ namespace boost_range_extension_size_test impl_t m_impl; }; - inline boost::range_difference >::type + inline boost::range_size >::type range_calculate_size(const FooWithoutSize& rng) { return 2u;