Merge pull request #75 from morinmorin/add_adl_barrier_to_distance

Add ADL guard namespace for boost::distance(rng)
This commit is contained in:
Peter Dimov
2018-09-23 20:08:55 +03:00
committed by GitHub

View File

@ -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