Changeset 54c9000 for src/Common
- Timestamp:
- Feb 13, 2018, 11:12:25 AM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, 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:
- 490ff5c3
- Parents:
- 7a052e34
- git-author:
- Rob Schluntz <rschlunt@…> (02/12/18 16:21:06)
- git-committer:
- Rob Schluntz <rschlunt@…> (02/13/18 11:12:25)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/utility.h
r7a052e34 r54c9000 98 98 } 99 99 100 template< typename SrcContainer, typename DestContainer, typename Predicate > 101 void cloneAll_if( const SrcContainer &src, DestContainer &dest, Predicate pred ) { 102 std::back_insert_iterator< DestContainer > out( dest ); 103 for ( auto x : src ) { 104 if ( pred(x) ) { 105 *out++ = x->clone(); 106 } 107 } // while 108 } 109 100 110 template< typename Container > 101 111 void assertAll( const Container &container ) {
Note: See TracChangeset
for help on using the changeset viewer.