forked from boostorg/range
commented out old array code
[SVN r36683]
This commit is contained in:
@ -57,6 +57,7 @@ namespace boost
|
|||||||
return const_cast<Char*>( str_end( s, s ) );
|
return const_cast<Char*>( str_end( s, s ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
template< class T, std::size_t sz >
|
template< class T, std::size_t sz >
|
||||||
inline T* array_end( T BOOST_RANGE_ARRAY_REF()[sz], int )
|
inline T* array_end( T BOOST_RANGE_ARRAY_REF()[sz], int )
|
||||||
{
|
{
|
||||||
@ -80,25 +81,32 @@ namespace boost
|
|||||||
{
|
{
|
||||||
return boost_range_array + sz - 1;
|
return boost_range_array + sz - 1;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
template< class T, std::size_t sz >
|
template< class T, std::size_t sz >
|
||||||
inline T* array_end( T BOOST_RANGE_ARRAY_REF()[sz] )
|
inline T* array_end( T BOOST_RANGE_ARRAY_REF()[sz] )
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< is_same<char,T>::value || is_same<wchar_t,T>::value,
|
typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< is_same<char,T>::value || is_same<wchar_t,T>::value,
|
||||||
char_or_wchar_t_array_tag,
|
char_or_wchar_t_array_tag,
|
||||||
int >::type tag;
|
int >::type tag;
|
||||||
|
|
||||||
return array_end<T,sz>( boost_range_array, tag() );
|
return array_end<T,sz>( boost_range_array, tag() );
|
||||||
|
*/
|
||||||
|
return boost_range_end + sz;
|
||||||
}
|
}
|
||||||
|
|
||||||
template< class T, std::size_t sz >
|
template< class T, std::size_t sz >
|
||||||
inline const T* array_end( const T BOOST_RANGE_ARRAY_REF()[sz] )
|
inline const T* array_end( const T BOOST_RANGE_ARRAY_REF()[sz] )
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< is_same<char,T>::value || is_same<wchar_t,T>::value,
|
typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< is_same<char,T>::value || is_same<wchar_t,T>::value,
|
||||||
char_or_wchar_t_array_tag,
|
char_or_wchar_t_array_tag,
|
||||||
int >::type tag;
|
int >::type tag;
|
||||||
|
|
||||||
return array_end<T,sz>( boost_range_array, tag() );
|
return array_end<T,sz>( boost_range_array, tag() );
|
||||||
|
*/
|
||||||
|
return boost_range_end + sz;
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
@ -110,7 +118,8 @@ namespace boost
|
|||||||
{
|
{
|
||||||
return str_end( s ) - s;
|
return str_end( s ) - s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
template< class T, std::size_t sz >
|
template< class T, std::size_t sz >
|
||||||
inline std::size_t array_size( T BOOST_RANGE_ARRAY_REF()[sz], int )
|
inline std::size_t array_size( T BOOST_RANGE_ARRAY_REF()[sz], int )
|
||||||
{
|
{
|
||||||
@ -134,24 +143,31 @@ namespace boost
|
|||||||
{
|
{
|
||||||
return sz - 1;
|
return sz - 1;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
template< class T, std::size_t sz >
|
template< class T, std::size_t sz >
|
||||||
inline std::size_t array_size( T BOOST_RANGE_ARRAY_REF()[sz] )
|
inline std::size_t array_size( T BOOST_RANGE_ARRAY_REF()[sz] )
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< is_same<const char,T>::value || is_same<const wchar_t,T>::value ||
|
typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< is_same<const char,T>::value || is_same<const wchar_t,T>::value ||
|
||||||
is_same<char,T>::value || is_same<wchar_t,T>::value,
|
is_same<char,T>::value || is_same<wchar_t,T>::value,
|
||||||
char_or_wchar_t_array_tag,
|
char_or_wchar_t_array_tag,
|
||||||
int >::type tag;
|
int >::type tag;
|
||||||
return array_size<T,sz>( boost_range_array, tag() );
|
return array_size<T,sz>( boost_range_array, tag() );
|
||||||
|
*/
|
||||||
|
return sz;
|
||||||
}
|
}
|
||||||
|
|
||||||
template< class T, std::size_t sz >
|
template< class T, std::size_t sz >
|
||||||
inline std::size_t array_size( const T BOOST_RANGE_ARRAY_REF()[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<char,T>::value || is_same<wchar_t,T>::value,
|
typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< is_same<char,T>::value || is_same<wchar_t,T>::value,
|
||||||
char_or_wchar_t_array_tag,
|
char_or_wchar_t_array_tag,
|
||||||
int >::type tag;
|
int >::type tag;
|
||||||
return array_size<T,sz>( boost_range_array, tag() );
|
return array_size<T,sz>( boost_range_array, tag() );
|
||||||
|
*/
|
||||||
|
return sz;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace 'range_detail'
|
} // namespace 'range_detail'
|
||||||
|
@ -159,8 +159,7 @@ namespace boost
|
|||||||
typedef IteratorT iterator;
|
typedef IteratorT iterator;
|
||||||
|
|
||||||
iterator_range() : m_Begin( iterator() ), m_End( iterator() )
|
iterator_range() : m_Begin( iterator() ), m_End( iterator() )
|
||||||
|
#ifndef NDEBUG
|
||||||
#ifndef NDEBUG
|
|
||||||
, singular( true )
|
, singular( true )
|
||||||
#endif
|
#endif
|
||||||
{ }
|
{ }
|
||||||
@ -386,6 +385,12 @@ namespace boost
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
protected:
|
||||||
|
//
|
||||||
|
// Allow subclasses an easy way to access the
|
||||||
|
// base type
|
||||||
|
//
|
||||||
|
typedef iterator_range iterator_range_;
|
||||||
};
|
};
|
||||||
|
|
||||||
// iterator range free-standing operators ---------------------------//
|
// iterator range free-standing operators ---------------------------//
|
||||||
|
Reference in New Issue
Block a user