Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
template<typename Iterator>
struct IteratorTraits {};
template<>
struct IteratorTraits<LinkedListIterator>
{
using iterator_category = std::bidirectional_iterator_tag;
};
template<>
struct IteratorTraits<VectorIterator>
{
using iterator_category = std::random_access_iterator_tag;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.