Date: Mon, 14 Apr 2025 23:28:37 -0400
On Mon, Apr 14, 2025 at 8:21 PM Frederick Virchanza Gotham via
Std-Proposals <std-proposals_at_[hidden]> wrote:
>
> Has there ever been any talk about making a concept extensible? i.e.
> you can change it after its original definition?
Only to the extent that the answer to "should a concept be extensible" is "no".
There's a reason concepts are the only kind of template that can't be
specialized. It is *very* important to the integrity of the concepts
system that there's a single, fixed definition against which all
constrained templates can be tested. `concept_name<type>` should have
exactly and only one answer, and that answer must be the same
everywhere.
You either alter your type to conform to the concept, or you create a
new concept that encompasses your type and other types. You don't
change a concept to conform to your type.
Std-Proposals <std-proposals_at_[hidden]> wrote:
>
> Has there ever been any talk about making a concept extensible? i.e.
> you can change it after its original definition?
Only to the extent that the answer to "should a concept be extensible" is "no".
There's a reason concepts are the only kind of template that can't be
specialized. It is *very* important to the integrity of the concepts
system that there's a single, fixed definition against which all
constrained templates can be tested. `concept_name<type>` should have
exactly and only one answer, and that answer must be the same
everywhere.
You either alter your type to conform to the concept, or you create a
new concept that encompasses your type and other types. You don't
change a concept to conform to your type.
Received on 2025-04-15 03:28:49