Changeset 44f6341 for src/Common


Ignore:
Timestamp:
Sep 2, 2016, 1:30:36 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
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)
Message:

fix implicit member ctor/dtor generation order, fix corresponding test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/utility.h

    r4d4882a r44f6341  
    260260};
    261261
     262template< typename T >
     263struct 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
     273template< typename T >
     274ReverseIter< T > ReverseIterate( T & ref ) {
     275        return ReverseIter< T >( ref );
     276}
     277
    262278#endif // _UTILITY_H
    263279
Note: See TracChangeset for help on using the changeset viewer.