Mercurial > Algorithms__Sedgewick
view .hgignore @ 25:3cdac4c29445
Refactored Queue's iterator and const_iterator into a template.
The generic_iterator can be instatiated as either a const or non-const iterator
as needed. It uses <type_traits> std::conditional<>::type create the
appropriate types as needed.
I learned this trick here:
http://www.sj-vs.net/c-implementing-const_iterator-and-non-const-iterator-without-code-duplication/
author | Eris Caffee <discordia@eldalin.com> |
---|---|
date | Tue, 23 Jun 2015 15:27:26 -0500 |
parents | 17ee997bf124 |
children |