forked from boostorg/range
updated naming convention
[SVN r24517]
This commit is contained in:
@ -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 );
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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'
|
||||
|
@ -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:
|
||||
|
@ -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'
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
Reference in New Issue
Block a user