C++ Logo

STD-PROPOSALS

Advanced search

Subject: [std-proposals] string contains wording
From: Wim Leflere (wim.leflere_at_[hidden])
Date: 2019-12-23 03:14:14


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



STD-PROPOSALS list run by std-proposals-owner@lists.isocpp.org

Standard Proposals Archives on Google Groups