Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 2
    Have you looked at the reference page of that function? Commented Apr 18, 2016 at 11:34
  • @Bob__ Thanks for your comment. I had a look at the function and there is an example of string match. I am not sure if that works for an array match. May be i am missing something. Commented Apr 18, 2016 at 11:39
  • 1
    You should include the right headers and those function belong to std::experimental not std::. Besides you should implement operator<< for array<int> or use a loop to print out the values ;) Commented Apr 18, 2016 at 11:43
  • 1
    @JonathanMee. I can't afford slow search, as my array in which i am searching is too large and i am sure make_boyer_moore_searcher is very fast. I am not sure what logic search use. Commented Apr 18, 2016 at 11:48
  • 1
    @AwaitedOne Have you benchmarked the default method used by std::search? It's only recommended to use specialisations if a need is proven. Also, your proposed alternative is experimental only and thus is not guaranteed to exist in all implementations, which has been proven below for yours. Commented Apr 18, 2016 at 12:37