C++ Logo


Advanced search

Re: [std-proposals] Requires-clause for data members

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Thu, 15 Feb 2024 12:04:16 +0200
On Thu, 15 Feb 2024 at 12:03, Jan Schultke via Std-Proposals
<std-proposals_at_[hidden]> wrote:
> It would mean that the data member would only exist if the
> requires-clause is satisfied, just like trailing requires clauses for
> member functions.

A requires-clause doesn't do that for a member function that is not a
special member function. The function
exists, but won't be chosen in overload resolution unless the
constraints are satisfied.

Received on 2024-02-15 10:04:30