From 22b7b4ec8e8cca9f62b256a30538739f7f8a3b3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20J=C3=B8rgen=20Ottosen?= Date: Wed, 10 Jan 2007 18:50:13 +0000 Subject: [PATCH] commented out old array code [SVN r36683] --- .../range/detail/implementation_help.hpp | 20 +++++++++++++++++-- include/boost/range/iterator_range.hpp | 9 +++++++-- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/include/boost/range/detail/implementation_help.hpp b/include/boost/range/detail/implementation_help.hpp index 11c6612..6890d53 100755 --- a/include/boost/range/detail/implementation_help.hpp +++ b/include/boost/range/detail/implementation_help.hpp @@ -57,6 +57,7 @@ namespace boost return const_cast( str_end( s, s ) ); } + /* template< class T, std::size_t sz > inline T* array_end( T BOOST_RANGE_ARRAY_REF()[sz], int ) { @@ -80,25 +81,32 @@ namespace boost { return boost_range_array + sz - 1; } + */ template< class T, std::size_t sz > inline T* array_end( T BOOST_RANGE_ARRAY_REF()[sz] ) { + /* typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< is_same::value || is_same::value, char_or_wchar_t_array_tag, int >::type tag; return array_end( boost_range_array, tag() ); + */ + return boost_range_end + sz; } template< class T, std::size_t sz > inline const T* array_end( const T BOOST_RANGE_ARRAY_REF()[sz] ) { + /* typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< is_same::value || is_same::value, char_or_wchar_t_array_tag, int >::type tag; return array_end( boost_range_array, tag() ); + */ + return boost_range_end + sz; } ///////////////////////////////////////////////////////////////////// @@ -110,7 +118,8 @@ namespace boost { return str_end( s ) - s; } - + + /* template< class T, std::size_t sz > inline std::size_t array_size( T BOOST_RANGE_ARRAY_REF()[sz], int ) { @@ -134,24 +143,31 @@ namespace boost { return sz - 1; } - + */ + template< class T, std::size_t sz > inline std::size_t array_size( T BOOST_RANGE_ARRAY_REF()[sz] ) { + /* typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< is_same::value || is_same::value || is_same::value || is_same::value, char_or_wchar_t_array_tag, int >::type tag; return array_size( boost_range_array, tag() ); + */ + return sz; } template< class T, std::size_t sz > inline std::size_t array_size( const T BOOST_RANGE_ARRAY_REF()[sz] ) { + /* typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< is_same::value || is_same::value, char_or_wchar_t_array_tag, int >::type tag; return array_size( boost_range_array, tag() ); + */ + return sz; } } // namespace 'range_detail' diff --git a/include/boost/range/iterator_range.hpp b/include/boost/range/iterator_range.hpp index a09ee30..ebdbc3e 100755 --- a/include/boost/range/iterator_range.hpp +++ b/include/boost/range/iterator_range.hpp @@ -159,8 +159,7 @@ namespace boost typedef IteratorT iterator; iterator_range() : m_Begin( iterator() ), m_End( iterator() ) - - #ifndef NDEBUG + #ifndef NDEBUG , singular( true ) #endif { } @@ -386,6 +385,12 @@ namespace boost } #endif + protected: + // + // Allow subclasses an easy way to access the + // base type + // + typedef iterator_range iterator_range_; }; // iterator range free-standing operators ---------------------------//