boostorg / range

Boost.org range module
http://boost.org/libs/range
42 stars 101 forks source link

Make range_value SFINAE-friendly #89

Open Lastique opened 5 years ago

Lastique commented 5 years ago

Currently (Boost 1.69) range_value<T>::type hard-fails to compile if T is not a range type. This is because it unconditionally uses range_iterator<T>::type and that type is missing in that case. Please, make range_value also SFINAE-friendly, i.e. so that it doesn't hard-fail the compilation but rather doesn't define the type type if T is not a range type.