Changeset 54c9000 for src/Common


Ignore:
Timestamp:
Feb 13, 2018, 11:12:25 AM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
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)
Message:

Fix missing attribute warning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/utility.h

    r7a052e34 r54c9000  
    9898}
    9999
     100template< typename SrcContainer, typename DestContainer, typename Predicate >
     101void 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
    100110template< typename Container >
    101111void assertAll( const Container &container ) {
Note: See TracChangeset for help on using the changeset viewer.