コード例 #1
0
ファイル: any_of.hpp プロジェクト: meetmorpheus/range-v3
 bool
 operator()(I first, S last, F pred, P proj = P{}) const
 {
     auto &&ipred = as_function(pred);
     auto &&iproj = as_function(proj);
     for(; first != last; ++first)
         if(ipred(iproj(*first)))
             return true;
     return false;
 }
コード例 #2
0
ファイル: all_of.hpp プロジェクト: QiTai/range-v3
 bool
 operator()(I first, S last, F pred, P proj = P{}) const
 {
     auto &&ipred = as_function(pred);
     auto &&iproj = as_function(proj);
     for(; first != last; ++first)
         if(!ipred(iproj(*first)))
             break;
     return first == last;
 }