C++ Logo


Advanced search

Re: why does std::basic_string should accept an std::basic_string_view with the same charT and Traits

From: Thiago Macieira <thiago_at_[hidden]>
Date: Sun, 13 Sep 2020 08:58:14 -0700
On Sunday, 13 September 2020 05:57:43 PDT Nikolay Mihaylov via Std-Proposals
> 3. you can use strcmp() - my favourite option but I like low lever stuff.
> 4. with cpp17 you can convert string to string view then compare string
> view's - convertion will be removed from the optimizer and you will get
> strcmp() under the hood.

Note that it's memcmp() we're talking about, not strcmp().

Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DPG Cloud Engineering

Received on 2020-09-13 10:58:19