Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created April 27, 2018 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/8eafeeff5200c846d9fc5255c64af55c to your computer and use it in GitHub Desktop.
Save deque-blog/8eafeeff5200c846d9fc5255c64af55c to your computer and use it in GitHub Desktop.
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