cpp-intro icon indicating copy to clipboard operation
cpp-intro copied to clipboard

std::search returns an iterator, but 016-algorithm states it returns bool

Open kimajin opened this issue 6 years ago • 0 comments

16.6節のsearch中の例のコードをコンパイルすると,no viable conversion error となります.

std::searchの動作は(文中の記法のもと) 「要素の並びがイテレーター[first1, last1)の範囲に存在すれば, 最初に一致する並びの先頭のイテレータを返し,そうでない場合はlast1を返す」 ではないでしょうか.

kimajin avatar Sep 24 '19 16:09 kimajin