cpp-intro
cpp-intro copied to clipboard
std::search returns an iterator, but 016-algorithm states it returns bool
16.6節のsearch中の例のコードをコンパイルすると,no viable conversion error となります.
std::searchの動作は(文中の記法のもと) 「要素の並びがイテレーター[first1, last1)の範囲に存在すれば, 最初に一致する並びの先頭のイテレータを返し,そうでない場合はlast1を返す」 ではないでしょうか.