Ignore:
Timestamp:
Jun 11, 2019, 5:52:50 PM (5 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
6625727
Parents:
4b7cce6
Message:

Port CandidateFinder::postvisit for UntypedExpr?, stub dependencies

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Candidate.hpp

    r4b7cce6 r432ce7a  
    7070using CandidateList = std::vector< CandidateRef >;
    7171
     72/// Splice src after dst, clearing src
     73static inline void splice( CandidateList & dst, CandidateList & src ) {
     74        dst.reserve( dst.size() + src.size() );
     75        for ( CandidateRef & r : src ) { dst.emplace_back( std::move( r ) ); }
     76        src.clear();
     77}
     78
     79/// Splice src before dst
     80static inline void spliceBegin( CandidateList & dst, CandidateList & src ) {
     81        splice( src, dst );
     82        dst.swap( src );
     83}
     84
    7285/// Sum the cost of a list of candidates
    7386static inline Cost sumCost( const CandidateList & candidates ) {
Note: See TracChangeset for help on using the changeset viewer.