Changeset 44f6341 for src/Common
- Timestamp:
- Sep 2, 2016, 1:30:36 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 85517ddb
- Parents:
- 4d4882a
- git-author:
- Rob Schluntz <rschlunt@…> (09/01/16 17:14:32)
- git-committer:
- Rob Schluntz <rschlunt@…> (09/02/16 13:30:36)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/utility.h
r4d4882a r44f6341 260 260 }; 261 261 262 template< typename T > 263 struct ReverseIter { 264 T& ref; 265 266 ReverseIter( T & ref ) : ref(ref) {} 267 268 typedef typename T::reverse_iterator iterator; 269 iterator begin() { return ref.rbegin(); } 270 iterator end() { return ref.rend(); } 271 }; 272 273 template< typename T > 274 ReverseIter< T > ReverseIterate( T & ref ) { 275 return ReverseIter< T >( ref ); 276 } 277 262 278 #endif // _UTILITY_H 263 279
Note: See TracChangeset
for help on using the changeset viewer.