mirror of
https://github.com/boostorg/range.git
synced 2025-07-29 20:37:25 +02:00
Merge pull request #75 from morinmorin/add_adl_barrier_to_distance
Add ADL guard namespace for boost::distance(rng)
This commit is contained in:
@ -23,13 +23,18 @@
|
||||
namespace boost
|
||||
{
|
||||
|
||||
template< class T >
|
||||
inline BOOST_CXX14_CONSTEXPR BOOST_DEDUCED_TYPENAME range_difference<T>::type
|
||||
distance( const T& r )
|
||||
namespace range_distance_adl_barrier
|
||||
{
|
||||
return boost::distance( boost::begin( r ), boost::end( r ) );
|
||||
template< class T >
|
||||
inline BOOST_CXX14_CONSTEXPR BOOST_DEDUCED_TYPENAME range_difference<T>::type
|
||||
distance( const T& r )
|
||||
{
|
||||
return boost::iterators::distance( boost::begin( r ), boost::end( r ) );
|
||||
}
|
||||
}
|
||||
|
||||
using namespace range_distance_adl_barrier;
|
||||
|
||||
} // namespace 'boost'
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user