C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Generic code, not the API you are looking for

From: Thiago Macieira <thiago_at_[hidden]>
Date: Sun, 21 Aug 2022 18:14:45 -0300
On Friday, 19 August 2022 15:07:35 -03 Zhihao Yuan via Std-Proposals wrote:
> override String for std::vector<char> {
> using char_type = char;
>
> bool starts_with(this auto const &v, std::string_view s) {
> return rg::starts_with(v, s);
> }
> }

This looks suspiciously like concept maps, which were part of the pre-C++11
concepts proposal. Remember that the one we have now is called "concepts lite"
for a reason.

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

Received on 2022-08-21 21:14:47