C++ Logo

std-proposals

Advanced search

string contains wording

From: Wim Leflere <wim.leflere_at_[hidden]>
Date: Mon, 23 Dec 2019 10:14:14 +0100
Hello,

I have added wording to my, 'string contains function' paper:
https://github.com/WimLeflere/cpp-papers/blob/master/string_contains_function.md#5-wording

I took a similar approach as P0457
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0457r2.html#wording>
.
The actual implementation (find(x) != npos) is done in one of the
string_view overloads.
The other overloads (of string and string_view) create a string_view and
call the implementation overload.

Is that a good approach?
Or should I use the 'find(x) != npos' implementation in all the overloads?

Regards,

Wim Leflere

Received on 2019-12-23 03:16:48