20 Aug
2014
20 Aug
'14
12:22 p.m.
On 19/08/14 15:17, Beman Dawes wrote:
Back in 2011, Howard Hinnant and I put together an is_iterator type trait based on code Howard had developed and used over a period of time.
See http://beman.github.io/is_iterator/is_iterator.hpp for the actual code
See http://beman.github.io/is_iterator/is_iterator_test.cpp for a test program.
AFAIK an iterator T doesn't have to provide an iterator_category typedef, only std::iterator_traits<T> does. Therefore this implementation wouldn't work for all iterators.