【C++】template 統合 ..
[2ch|▼Menu]
396:デフォルトの名無しさん
05/03/13 22:50:55
条件Aに適合する場合にBを適用するという意味で
apply_if を書いてみたのですが、駄目だしをお願いします。

  template <typename IIte, typename CheckPred, typename ApplyPred>
    void apply_if(IIte begin, IIte end, CheckPred check, ApplyPred apply)
  {
    for(;begin!=end;++begin)
    {
      if(check(*begin)) apply(*begin);
    }
  }



次ページ
続きを表示
1を表示
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
暇つぶし2ch

5389日前に更新/262 KB
担当:undef