forked from boostorg/range
added remove_const to parameters to avoid common instantiations errors
[SVN r30855]
This commit is contained in:
@ -15,6 +15,7 @@
|
|||||||
# pragma once
|
# pragma once
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <boost/type_traits/remove_const.hpp>
|
||||||
#include <boost/range/config.hpp>
|
#include <boost/range/config.hpp>
|
||||||
|
|
||||||
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||||
@ -46,7 +47,8 @@ namespace range_detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template< typename C >
|
template< typename C >
|
||||||
inline BOOST_DEDUCED_TYPENAME range_iterator<C>::type
|
inline BOOST_DEDUCED_TYPENAME range_iterator<
|
||||||
|
typename remove_const<C>::type >::type
|
||||||
boost_range_begin( C& c )
|
boost_range_begin( C& c )
|
||||||
{
|
{
|
||||||
return c.begin();
|
return c.begin();
|
||||||
@ -140,7 +142,8 @@ namespace range_detail
|
|||||||
|
|
||||||
|
|
||||||
template< class T >
|
template< class T >
|
||||||
inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type begin( T& r )
|
inline BOOST_DEDUCED_TYPENAME range_iterator<
|
||||||
|
typename remove_const<T>::type >::type begin( T& r )
|
||||||
{
|
{
|
||||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
|
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
|
||||||
!BOOST_WORKAROUND(__GNUC__, < 3) \
|
!BOOST_WORKAROUND(__GNUC__, < 3) \
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
# pragma once
|
# pragma once
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <boost/type_traits/remove_const.hpp>
|
||||||
#include <boost/range/config.hpp>
|
#include <boost/range/config.hpp>
|
||||||
|
|
||||||
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||||
@ -47,7 +48,8 @@ namespace range_detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template< typename C >
|
template< typename C >
|
||||||
inline BOOST_DEDUCED_TYPENAME range_iterator<C>::type
|
inline BOOST_DEDUCED_TYPENAME range_iterator<
|
||||||
|
typename remove_const<C>::type >::type
|
||||||
boost_range_end( C& c )
|
boost_range_end( C& c )
|
||||||
{
|
{
|
||||||
return c.end();
|
return c.end();
|
||||||
@ -139,7 +141,8 @@ namespace range_detail
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
template< class T >
|
template< class T >
|
||||||
inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type end( T& r )
|
inline BOOST_DEDUCED_TYPENAME range_iterator<
|
||||||
|
typename remove_const<T>::type >::type end( T& r )
|
||||||
{
|
{
|
||||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
|
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
|
||||||
!BOOST_WORKAROUND(__GNUC__, < 3) \
|
!BOOST_WORKAROUND(__GNUC__, < 3) \
|
||||||
|
@ -35,10 +35,12 @@ rbegin( C& c )
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
template< class C >
|
template< class C >
|
||||||
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
|
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<
|
||||||
|
typename remove_const<C>::type >::type
|
||||||
rbegin( C& c )
|
rbegin( C& c )
|
||||||
{
|
{
|
||||||
typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
|
typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<
|
||||||
|
typename remove_const<C>::type >::type
|
||||||
iter_type;
|
iter_type;
|
||||||
return iter_type( end( c ) );
|
return iter_type( end( c ) );
|
||||||
}
|
}
|
||||||
|
@ -35,10 +35,12 @@ rend( C& c )
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
template< class C >
|
template< class C >
|
||||||
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
|
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<
|
||||||
|
typename remove_const<C>::type >::type
|
||||||
rend( C& c )
|
rend( C& c )
|
||||||
{
|
{
|
||||||
typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
|
typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<
|
||||||
|
typename remove_const<C>::type >::type
|
||||||
iter_type;
|
iter_type;
|
||||||
return iter_type( begin( c ) );
|
return iter_type( begin( c ) );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user