Last active
April 27, 2018 15:11
-
-
Save deque-blog/84ec283df53d36b3b51bd356b9937450 to your computer and use it in GitHub Desktop.
This file contains 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
template<typename Iterator, typename Distance> | |
void advance(Iterator& it, Distance n, std::bidirectional_iterator_tag) | |
{ | |
// Bidirectional implementation | |
} | |
template<typename Iterator, typename Distance> | |
void advance(Iterator& it, Distance n, std::random_access_iterator_tag) | |
{ | |
// Random access implementation | |
} | |
template<typename Iterator, typename Distance> | |
void advance(Iterator& it, Distance n) | |
{ | |
return advance(it, n, typename Iterator::iterator_category{}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment