【C++】template 統合スレ -- Part6
■ このスレッドは過去ログ倉庫に格納されています
0396デフォルトの名無しさん
05/03/13 22:50:55apply_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);
}
}
■ このスレッドは過去ログ倉庫に格納されています