updated naming convention

[SVN r24517]
This commit is contained in:
Thorsten Jørgen Ottosen
2004-08-16 22:07:07 +00:00
parent 531339a51d
commit a3d3c28ccc
32 changed files with 219 additions and 216 deletions

View File

@ -26,7 +26,7 @@
namespace boost
{
namespace range
namespace range_detail
{
//////////////////////////////////////////////////////////////////////
@ -34,14 +34,14 @@ namespace range
//////////////////////////////////////////////////////////////////////
template< typename C >
inline BOOST_DEDUCED_TYPENAME const_iterator_of<C>::type
inline BOOST_DEDUCED_TYPENAME range_const_iterator<C>::type
begin( const C& c )
{
return c.begin();
}
template< typename C >
inline BOOST_DEDUCED_TYPENAME iterator_of<C>::type
inline BOOST_DEDUCED_TYPENAME range_iterator<C>::type
begin( C& c )
{
return c.begin();
@ -104,28 +104,28 @@ namespace range
return s;
}
} // namespace 'range'
} // namespace 'range_detail'
template< class T >
inline BOOST_DEDUCED_TYPENAME iterator_of<T>::type begin( T& r )
inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type begin( T& r )
{
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
using range::begin;
using range_detail::begin;
return begin( r );
#else
return range::begin( r );
return range_detail::begin( r );
#endif
}
template< class T >
inline BOOST_DEDUCED_TYPENAME const_iterator_of<T>::type begin( const T& r )
inline BOOST_DEDUCED_TYPENAME range_const_iterator<T>::type begin( const T& r )
{
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
using range::begin;
using range_detail::begin;
return begin( r );
#else
return range::begin( r );
return range_detail::begin( r );
#endif
}

View File

@ -31,7 +31,7 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template< typename C >
struct const_iterator_of
struct range_const_iterator
{
typedef BOOST_DEDUCED_TYPENAME C::const_iterator type;
};
@ -41,13 +41,13 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template< typename Iterator >
struct const_iterator_of< std::pair<Iterator,Iterator> >
struct range_const_iterator< std::pair<Iterator,Iterator> >
{
typedef Iterator type;
};
template< typename Iterator >
struct const_iterator_of< const std::pair<Iterator,Iterator> >
struct range_const_iterator< const std::pair<Iterator,Iterator> >
{
typedef Iterator type;
};
@ -57,13 +57,13 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template< typename T, std::size_t sz >
struct const_iterator_of< T[sz] >
struct range_const_iterator< T[sz] >
{
typedef const T* type;
};
template< typename T, std::size_t sz >
struct const_iterator_of< const T[sz] >
struct range_const_iterator< const T[sz] >
{
typedef const T* type;
};
@ -73,25 +73,25 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template<>
struct const_iterator_of< char* >
struct range_const_iterator< char* >
{
typedef const char* type;
};
template<>
struct const_iterator_of< wchar_t* >
struct range_const_iterator< wchar_t* >
{
typedef const wchar_t* type;
};
template<>
struct const_iterator_of< const char* >
struct range_const_iterator< const char* >
{
typedef const char* type;
};
template<>
struct const_iterator_of< const wchar_t* >
struct range_const_iterator< const wchar_t* >
{
typedef const wchar_t* type;
};

View File

@ -26,10 +26,10 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template< typename C >
struct const_reverse_iterator_of
struct range_const_reverse_iterator
{
typedef reverse_iterator<
BOOST_DEDUCED_TYPENAME const_iterator_of<C>::type > type;
BOOST_DEDUCED_TYPENAME range_const_iterator<C>::type > type;
};
} // namespace boost

View File

@ -30,7 +30,7 @@ namespace boost
struct range_begin<std_container_>
{
template< typename C >
static BOOST_RANGE_DEDUCED_TYPENAME result_iterator_of<C>::type fun( C& c )
static BOOST_RANGE_DEDUCED_TYPENAME range_result_iterator<C>::type fun( C& c )
{
return c.begin();
};
@ -44,7 +44,7 @@ namespace boost
struct range_begin<std_pair_>
{
template< typename P >
static BOOST_RANGE_DEDUCED_TYPENAME result_iterator_of<P>::type fun( const P& p )
static BOOST_RANGE_DEDUCED_TYPENAME range_result_iterator<P>::type fun( const P& p )
{
return p.first;
}
@ -108,7 +108,7 @@ namespace boost
} // namespace 'range_detail'
template< typename C >
inline BOOST_DEDUCED_TYPENAME result_iterator_of<C>::type
inline BOOST_DEDUCED_TYPENAME range_result_iterator<C>::type
begin( C& c )
{
return range_detail::range_begin< BOOST_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );

View File

@ -111,7 +111,7 @@ namespace boost
}
template< typename C >
class const_iterator_of
class range_const_iterator
{
typedef BOOST_DEDUCED_TYPENAME range_detail::range<C>::type c_type;
public:

View File

@ -108,7 +108,7 @@ namespace boost
}
template< typename C >
class difference_type_of
class range_difference
{
typedef BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type c_type;
public:

View File

@ -30,7 +30,8 @@ namespace boost
struct range_end<std_container_>
{
template< typename C >
static BOOST_RANGE_DEDUCED_TYPENAME result_iterator_of<C>::type fun( C& c )
static BOOST_RANGE_DEDUCED_TYPENAME range_result_iterator<C>::type
fun( C& c )
{
return c.end();
};
@ -44,7 +45,8 @@ namespace boost
struct range_end<std_pair_>
{
template< typename P >
static BOOST_RANGE_DEDUCED_TYPENAME result_iterator_of<P>::type fun( const P& p )
static BOOST_RANGE_DEDUCED_TYPENAME range_result_iterator<P>::type
fun( const P& p )
{
return p.second;
}
@ -129,10 +131,10 @@ namespace boost
} // namespace 'range_detail'
template< typename C >
inline BOOST_DEDUCED_TYPENAME result_iterator_of<C>::type
inline BOOST_DEDUCED_TYPENAME range_result_iterator<C>::type
end( C& c )
{
return range_detail::range_end< BOOST_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
return range_detail::range_end< BOOST_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
}
} // namespace 'boost'

View File

@ -110,7 +110,7 @@ namespace boost
}
template< typename C >
class iterator_of
class range_iterator
{
typedef BOOST_DEDUCED_TYPENAME range_detail::range<C>::type c_type;
public:

View File

@ -22,14 +22,14 @@ namespace boost
namespace range_detail
{
template< typename T >
struct range_size;
struct range_size_;
//////////////////////////////////////////////////////////////////////
// default
//////////////////////////////////////////////////////////////////////
template<>
struct range_size<std_container_>
struct range_size_<std_container_>
{
template< typename C >
static BOOST_RANGE_DEDUCED_TYPENAME C::size_type fun( const C& c )
@ -43,10 +43,11 @@ namespace boost
//////////////////////////////////////////////////////////////////////
template<>
struct range_size<std_pair_>
struct range_size_<std_pair_>
{
template< typename P >
static BOOST_RANGE_DEDUCED_TYPENAME size_type_of<P>::type fun( const P& p )
static BOOST_RANGE_DEDUCED_TYPENAME range_size<P>::type
fun( const P& p )
{
return std::distance( p.first, p.second );
}
@ -57,30 +58,30 @@ namespace boost
//////////////////////////////////////////////////////////////////////
template<>
struct range_size<array_>
struct range_size_<array_>
{
template< typename T, std::size_t sz >
static std::size_t fun( T BOOST_ARRAY_REF[sz] )
static std::size_t fun( T BOOST_RANGE_ARRAY_REF()[sz] )
{
return sz;
}
};
template<>
struct range_size<char_array_>
struct range_size_<char_array_>
{
template< typename T, std::size_t sz >
static std::size_t fun( T BOOST_ARRAY_REF[sz] )
static std::size_t fun( T BOOST_RANGE_ARRAY_REF()[sz] )
{
return boost::range_detail::array_size( array );
}
};
template<>
struct range_size<wchar_t_array_>
struct range_size_<wchar_t_array_>
{
template< typename T, std::size_t sz >
static std::size_t fun( T BOOST_ARRAY_REF[sz] )
static std::size_t fun( T BOOST_RANGE_ARRAY_REF()[sz] )
{
return boost::range_detail::array_size( array );
}
@ -91,7 +92,7 @@ namespace boost
//////////////////////////////////////////////////////////////////////
template<>
struct range_size<char_ptr_>
struct range_size_<char_ptr_>
{
static std::size_t fun( const char* s )
{
@ -100,7 +101,7 @@ namespace boost
};
template<>
struct range_size<const_char_ptr_>
struct range_size_<const_char_ptr_>
{
static std::size_t fun( const char* s )
{
@ -109,7 +110,7 @@ namespace boost
};
template<>
struct range_size<wchar_t_ptr_>
struct range_size_<wchar_t_ptr_>
{
static std::size_t fun( const wchar_t* s )
{
@ -118,7 +119,7 @@ namespace boost
};
template<>
struct range_size<const_wchar_t_ptr_>
struct range_size_<const_wchar_t_ptr_>
{
static std::size_t fun( const wchar_t* s )
{
@ -130,10 +131,10 @@ namespace boost
template< typename C >
BOOST_RANGE_DEDUCED_TYPENAME size_type_of<C>::type
BOOST_RANGE_DEDUCED_TYPENAME range_size<C>::type
size( const C& c )
{
return range_detail::range_size< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
return range_detail::range_size_< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
}
} // namespace 'boost'

View File

@ -102,12 +102,11 @@ namespace boost
{
typedef std::size_t type;
};
};
};
}
template< typename C >
class size_type_of
class range_size
{
typedef BOOST_DEDUCED_TYPENAME range_detail::range<C>::type c_type;
public:

View File

@ -12,6 +12,7 @@
#define BOOST_RANGE_DETAIL_VALUE_TYPE_HPP
#include <boost/range/detail/common.hpp>
#include <boost/type_traits/remove_bounds.hpp>
#include <boost/iterator/iterator_traits.hpp>
//////////////////////////////////////////////////////////////////////////////
@ -51,7 +52,7 @@ namespace boost
template< typename T >
struct pts
{
typedef void /*dummy*/ type;
typedef BOOST_DEDUCED_TYPENAME boost::remove_bounds<T>::type type;
};
};
@ -108,7 +109,7 @@ namespace boost
}
template< typename C >
class value_type_of
class range_value
{
typedef BOOST_DEDUCED_TYPENAME range_detail::range<C>::type c_type;
public:

View File

@ -32,7 +32,7 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template< typename C >
struct difference_type_of
struct range_difference
{
typedef BOOST_DEDUCED_TYPENAME C::difference_type type;
};
@ -42,14 +42,14 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template< typename Iterator >
struct difference_type_of< std::pair<Iterator,Iterator> >
struct range_difference< std::pair<Iterator,Iterator> >
{
typedef BOOST_DEDUCED_TYPENAME
iterator_difference<Iterator>::type type;
};
template< typename Iterator >
struct difference_type_of< const std::pair<Iterator,Iterator> >
struct range_difference< const std::pair<Iterator,Iterator> >
{
typedef BOOST_DEDUCED_TYPENAME
iterator_difference<Iterator>::type type;
@ -61,13 +61,13 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template< typename T, std::size_t sz >
struct difference_type_of< T[sz] >
struct range_difference< T[sz] >
{
typedef std::ptrdiff_t type;
};
template< typename T, std::size_t sz >
struct difference_type_of< const T[sz] >
struct range_difference< const T[sz] >
{
typedef std::ptrdiff_t type;
};
@ -77,25 +77,25 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template<>
struct difference_type_of< char* >
struct range_difference< char* >
{
typedef std::ptrdiff_t type;
};
template<>
struct difference_type_of< wchar_t* >
struct range_difference< wchar_t* >
{
typedef std::ptrdiff_t type;
};
template<>
struct difference_type_of< const char* >
struct range_difference< const char* >
{
typedef std::ptrdiff_t type;
};
template<>
struct difference_type_of< const wchar_t* >
struct range_difference< const wchar_t* >
{
typedef std::ptrdiff_t type;
};

View File

@ -25,7 +25,7 @@
namespace boost
{
namespace range
namespace range_detail
{
//////////////////////////////////////////////////////////////////////
@ -52,16 +52,16 @@ namespace range
return s == 0 || s[0] == 0;
}
} // namespace 'range'
} // namespace 'range_detail'
template< class T >
inline bool empty( const T& r )
{
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
using range::empty;
using range_detail::empty;
return empty( r );
#else
return range::empty( r );
return range_detail::empty( r );
#endif
}

View File

@ -27,7 +27,7 @@
namespace boost
{
namespace range
namespace range_detail
{
//////////////////////////////////////////////////////////////////////
@ -35,14 +35,14 @@ namespace range
//////////////////////////////////////////////////////////////////////
template< typename C >
inline BOOST_DEDUCED_TYPENAME const_iterator_of<C>::type
inline BOOST_DEDUCED_TYPENAME range_const_iterator<C>::type
end( const C& c )
{
return c.end();
}
template< typename C >
inline BOOST_DEDUCED_TYPENAME iterator_of<C>::type
inline BOOST_DEDUCED_TYPENAME range_iterator<C>::type
end( C& c )
{
return c.end();
@ -104,27 +104,27 @@ namespace range
return range_detail::str_end( s );
}
} // namespace 'range'
} // namespace 'range_detail'
template< class T >
inline BOOST_DEDUCED_TYPENAME iterator_of<T>::type end( T& r )
inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type end( T& r )
{
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
using range::end;
using range_detail::end;
return end( r );
#else
return range::end( r );
return range_detail::end( r );
#endif
}
template< class T >
inline BOOST_DEDUCED_TYPENAME const_iterator_of<T>::type end( const T& r )
inline BOOST_DEDUCED_TYPENAME range_const_iterator<T>::type end( const T& r )
{
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
using range::end;
using range_detail::end;
return end( r );
#else
return range::end( r );
return range_detail::end( r );
#endif
}

View File

@ -32,7 +32,7 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template< typename C >
struct iterator_of
struct range_iterator
{
typedef BOOST_DEDUCED_TYPENAME C::iterator type;
};
@ -42,13 +42,13 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template< typename Iterator >
struct iterator_of< std::pair<Iterator,Iterator> >
struct range_iterator< std::pair<Iterator,Iterator> >
{
typedef Iterator type;
};
template< typename Iterator >
struct iterator_of< const std::pair<Iterator,Iterator> >
struct range_iterator< const std::pair<Iterator,Iterator> >
{
typedef Iterator type;
};
@ -58,13 +58,13 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template< typename T, std::size_t sz >
struct iterator_of< T[sz] >
struct range_iterator< T[sz] >
{
typedef T* type;
};
template< typename T, std::size_t sz >
struct iterator_of< const T[sz] >
struct range_iterator< const T[sz] >
{
typedef const T* type;
};
@ -74,25 +74,25 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template<>
struct iterator_of< char* >
struct range_iterator< char* >
{
typedef char* type;
};
template<>
struct iterator_of< wchar_t* >
struct range_iterator< wchar_t* >
{
typedef wchar_t* type;
};
template<>
struct iterator_of< const char* >
struct range_iterator< const char* >
{
typedef const char* type;
};
template<>
struct iterator_of< const wchar_t* >
struct range_iterator< const wchar_t* >
{
typedef const wchar_t* type;
};

View File

@ -221,10 +221,10 @@ namespace boost {
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< typename Range >
inline iterator_range< BOOST_DEDUCED_TYPENAME result_iterator_of<Range>::type >
inline iterator_range< BOOST_DEDUCED_TYPENAME range_result_iterator<Range>::type >
make_iterator_range( Range& r )
{
return iterator_range< BOOST_DEDUCED_TYPENAME result_iterator_of<Range>::type >
return iterator_range< BOOST_DEDUCED_TYPENAME range_result_iterator<Range>::type >
( begin( r ), end( r ) );
}
@ -235,18 +235,18 @@ namespace boost {
and end iterators.
*/
template< class ForwardRange >
inline iterator_range< BOOST_DEDUCED_TYPENAME iterator_of<ForwardRange>::type >
inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type >
make_iterator_range( ForwardRange& r )
{
return iterator_range< BOOST_DEDUCED_TYPENAME iterator_of<ForwardRange>::type >
return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type >
( r );
}
template< class ForwardRange >
inline iterator_range< BOOST_DEDUCED_TYPENAME const_iterator_of<ForwardRange>::type >
inline iterator_range< BOOST_DEDUCED_TYPENAME range_const_iterator<ForwardRange>::type >
make_iterator_range( const ForwardRange& r )
{
return iterator_range< BOOST_DEDUCED_TYPENAME const_iterator_of<ForwardRange>::type >
return iterator_range< BOOST_DEDUCED_TYPENAME range_const_iterator<ForwardRange>::type >
( r );
}
#endif

View File

@ -26,26 +26,26 @@ namespace boost
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< class C >
inline BOOST_DEDUCED_TYPENAME reverse_result_iterator_of<C>::type
inline BOOST_DEDUCED_TYPENAME range_reverse_result_iterator<C>::type
rbegin( C& c )
{
return BOOST_DEDUCED_TYPENAME reverse_result_iterator_of<C>::type( end( c ) );
return BOOST_DEDUCED_TYPENAME range_reverse_result_iterator<C>::type( end( c ) );
}
#else
template< class C >
inline BOOST_DEDUCED_TYPENAME reverse_iterator_of<C>::type
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
rbegin( C& c )
{
return BOOST_DEDUCED_TYPENAME reverse_iterator_of<C>::type( end( c ) );
return BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type( end( c ) );
}
template< class C >
inline BOOST_DEDUCED_TYPENAME const_reverse_iterator_of<C>::type
inline BOOST_DEDUCED_TYPENAME range_const_reverse_iterator<C>::type
rbegin( const C& c )
{
return BOOST_DEDUCED_TYPENAME const_reverse_iterator_of<C>::type( end( c ) );
return BOOST_DEDUCED_TYPENAME range_const_reverse_iterator<C>::type( end( c ) );
}
#endif

View File

@ -26,26 +26,26 @@ namespace boost
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< class C >
inline BOOST_DEDUCED_TYPENAME reverse_result_iterator_of<C>::type
inline BOOST_DEDUCED_TYPENAME range_reverse_result_iterator<C>::type
rend( C& c )
{
return BOOST_DEDUCED_TYPENAME reverse_result_iterator_of<C>::type( begin( c ) );
return BOOST_DEDUCED_TYPENAME range_reverse_result_iterator<C>::type( begin( c ) );
}
#else
template< class C >
inline BOOST_DEDUCED_TYPENAME reverse_iterator_of<C>::type
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
rend( C& c )
{
return BOOST_DEDUCED_TYPENAME reverse_iterator_of<C>::type( begin( c ) );
return BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type( begin( c ) );
}
template< class C >
inline BOOST_DEDUCED_TYPENAME const_reverse_iterator_of<C>::type
inline BOOST_DEDUCED_TYPENAME range_const_reverse_iterator<C>::type
rend( const C& c )
{
return BOOST_DEDUCED_TYPENAME const_reverse_iterator_of<C>::type( begin( c ) );
return BOOST_DEDUCED_TYPENAME range_const_reverse_iterator<C>::type( begin( c ) );
}
#endif

View File

@ -28,12 +28,12 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template< typename C >
struct result_iterator_of
struct range_result_iterator
{
typedef BOOST_RANGE_DEDUCED_TYPENAME
mpl::if_< BOOST_DEDUCED_TYPENAME is_const<C>::type,
BOOST_DEDUCED_TYPENAME const_iterator_of<C>::type,
BOOST_DEDUCED_TYPENAME iterator_of<C>::type >::type type;
BOOST_DEDUCED_TYPENAME range_const_iterator<C>::type,
BOOST_DEDUCED_TYPENAME range_iterator<C>::type >::type type;
};
} // namespace boost

View File

@ -27,10 +27,10 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template< typename C >
struct reverse_iterator_of
struct range_reverse_iterator
{
typedef reverse_iterator<
BOOST_DEDUCED_TYPENAME iterator_of<C>::type > type;
BOOST_DEDUCED_TYPENAME range_iterator<C>::type > type;
};

View File

@ -26,10 +26,10 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template< typename C >
struct reverse_result_iterator_of
struct range_reverse_result_iterator
{
typedef reverse_iterator<
BOOST_DEDUCED_TYPENAME result_iterator_of<C>::type > type;
BOOST_DEDUCED_TYPENAME range_result_iterator<C>::type > type;
};
} // namespace boost

View File

@ -29,7 +29,7 @@
namespace boost
{
namespace range
namespace range_detail
{
//////////////////////////////////////////////////////////////////////
@ -86,13 +86,13 @@ namespace range
} // namespace 'range'
template< class T >
inline BOOST_DEDUCED_TYPENAME size_type_of<T>::type size( const T& r )
inline BOOST_DEDUCED_TYPENAME range_size<T>::type size( const T& r )
{
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
using range::size;
using range_detail::size;
return size( r );
#else
return range::size( r );
return range_detail::size( r );
#endif
}

View File

@ -31,7 +31,7 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template< typename C >
struct size_type_of
struct range_size
{
typedef BOOST_DEDUCED_TYPENAME C::size_type type;
};
@ -41,13 +41,13 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template< typename Iterator >
struct size_type_of< std::pair<Iterator,Iterator> >
struct range_size< std::pair<Iterator,Iterator> >
{
typedef std::size_t type;
};
template< typename Iterator >
struct size_type_of< const std::pair<Iterator,Iterator> >
struct range_size< const std::pair<Iterator,Iterator> >
{
typedef std::size_t type;
};
@ -57,13 +57,13 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template< typename T, std::size_t sz >
struct size_type_of< T[sz] >
struct range_size< T[sz] >
{
typedef std::size_t type;
};
template< typename T, std::size_t sz >
struct size_type_of< const T[sz] >
struct range_size< const T[sz] >
{
typedef std::size_t type;
};
@ -73,25 +73,25 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template<>
struct size_type_of< char* >
struct range_size< char* >
{
typedef std::size_t type;
};
template<>
struct size_type_of< wchar_t* >
struct range_size< wchar_t* >
{
typedef std::size_t type;
};
template<>
struct size_type_of< const char* >
struct range_size< const char* >
{
typedef std::size_t type;
};
template<>
struct size_type_of< const wchar_t* >
struct range_size< const wchar_t* >
{
typedef std::size_t type;
};

View File

@ -22,17 +22,17 @@ namespace boost
{
template< class ForwardRange >
class sub_range : public iterator_range< BOOST_DEDUCED_TYPENAME result_iterator_of<ForwardRange>::type >
class sub_range : public iterator_range< BOOST_DEDUCED_TYPENAME range_result_iterator<ForwardRange>::type >
{
typedef BOOST_DEDUCED_TYPENAME result_iterator_of<ForwardRange>::type iterator_t;
typedef BOOST_DEDUCED_TYPENAME range_result_iterator<ForwardRange>::type iterator_t;
typedef iterator_range< iterator_t > base;
public:
typedef BOOST_DEDUCED_TYPENAME value_type_of<ForwardRange>::type value_type;
typedef BOOST_DEDUCED_TYPENAME result_iterator_of<ForwardRange>::type iterator;
typedef BOOST_DEDUCED_TYPENAME const_iterator_of<ForwardRange>::type const_iterator;
typedef BOOST_DEDUCED_TYPENAME difference_type_of<ForwardRange>::type difference_type;
typedef BOOST_DEDUCED_TYPENAME size_type_of<ForwardRange>::type size_type;
typedef BOOST_DEDUCED_TYPENAME range_value<ForwardRange>::type value_type;
typedef BOOST_DEDUCED_TYPENAME range_result_iterator<ForwardRange>::type iterator;
typedef BOOST_DEDUCED_TYPENAME range_const_iterator<ForwardRange>::type const_iterator;
typedef BOOST_DEDUCED_TYPENAME range_difference<ForwardRange>::type difference_type;
typedef BOOST_DEDUCED_TYPENAME range_size<ForwardRange>::type size_type;
public:
template< class ForwardRange2 >

View File

@ -33,7 +33,7 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template< typename C >
struct value_type_of
struct range_value
{
typedef BOOST_DEDUCED_TYPENAME C::value_type type;
};
@ -43,7 +43,7 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template< typename Iterator >
struct value_type_of< std::pair<Iterator,Iterator> >
struct range_value< std::pair<Iterator,Iterator> >
{
typedef BOOST_DEDUCED_TYPENAME
iterator_value<Iterator>::type type;
@ -51,7 +51,7 @@ namespace boost
template< typename Iterator >
struct value_type_of< const std::pair<Iterator,Iterator> >
struct range_value< const std::pair<Iterator,Iterator> >
{
typedef BOOST_DEDUCED_TYPENAME
iterator_value<Iterator>::type type;
@ -62,13 +62,13 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template< typename T, std::size_t sz >
struct value_type_of< T[sz] >
struct range_value< T[sz] >
{
typedef T type;
};
template< typename T, std::size_t sz >
struct value_type_of< const T[sz] >
struct range_value< const T[sz] >
{
typedef const T type;
};
@ -78,25 +78,25 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
template<>
struct value_type_of< char* >
struct range_value< char* >
{
typedef char type;
};
template<>
struct value_type_of< wchar_t* >
struct range_value< wchar_t* >
{
typedef wchar_t type;
};
template<>
struct value_type_of< const char* >
struct range_value< const char* >
{
typedef const char type;
};
template<>
struct value_type_of< const wchar_t* >
struct range_value< const wchar_t* >
{
typedef const wchar_t type;
};