C++ Logo

std-proposals

Advanced search

Re: [std-proposals] [Resurrected Proposal] Concept introduces a typename

From: Tom Honermann <tom_at_[hidden]>
Date: Tue, 2 May 2023 12:37:10 -0400
On 5/2/23 9:04 AM, Frederick Virchanza Gotham via Std-Proposals wrote:
> On Tue, May 2, 2023 at 12:32 PM Andrew Tomazos via Std-Proposals
> <std-proposals_at_[hidden]> wrote:
>> For what it's worth, I'm strongly in favor of the underlying motivation of this proposal.
>>
>> You should be able to write:
>>
>> void sort(Sortable& x);
>>
>> as was originally intended when concepts were designed.
>
> I have only one concern about that:
>
> void Func(Sortable &x)
> {
> static once_flag of;
>
> call_once(of, [](){ cout << "I hope this only happens once\n"; });
> }
>
> It isn't obvious at first glance that the 'call_once' could happen
> more than once.

See also P0696 (Remove abbreviated functions and template-introduction
syntax from the Concepts TS) <https://wg21.link/p0696>.

Tom.

Received on 2023-05-02 16:37:11