Created
May 27, 2015 19:43
-
-
Save ThePhD/6baa4eaa11a7c856f8dc to your computer and use it in GitHub Desktop.
SFINAE for iterators (which is currently bad, must change to use function-style and then delegate to std::integral_constant IIRC)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace detail { | |
| template<typename T, typename = void> | |
| struct is_iterator : std::false_type { | |
| }; | |
| template<typename T> | |
| struct is_iterator<T, typename std::enable_if<!std::is_same<typename std::iterator_traits<T>::value_type, void>::value>::type> : std::true_type { | |
| }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment