Date: Tue, 15 Apr 2025 10:11:17 +0200
On Tue, Apr 15, 2025 at 2:21 AM 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?
I am not familiar with standardization, but I will just say I *believe *that
typelist is not what concepts are designed for.
They are for "groups" of types that posses certain syntactical properties
that can be expressed in code, and maybe some semantic ones(e.g.
complexity) that can not.
Good example is that random access and contiguous iterator difference can
not be detected by concept in a sense of pure operations allowed on
iterator, so concept basically has to ask type if it is contiguous
iterator, i.e.
template< class I >
concept contiguous_iterator =
std::random_access_iterator<I> &&
std::derived_from</*ITER_CONCEPT*/<I>,
std::contiguous_iterator_tag> &&
...
Also as mentioned before numeric_limits has a way for your type to say I am
a "numeric" type, but I am uncertain if that is just for integers and fps
or all numeric types.
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?
I am not familiar with standardization, but I will just say I *believe *that
typelist is not what concepts are designed for.
They are for "groups" of types that posses certain syntactical properties
that can be expressed in code, and maybe some semantic ones(e.g.
complexity) that can not.
Good example is that random access and contiguous iterator difference can
not be detected by concept in a sense of pure operations allowed on
iterator, so concept basically has to ask type if it is contiguous
iterator, i.e.
template< class I >
concept contiguous_iterator =
std::random_access_iterator<I> &&
std::derived_from</*ITER_CONCEPT*/<I>,
std::contiguous_iterator_tag> &&
...
Also as mentioned before numeric_limits has a way for your type to say I am
a "numeric" type, but I am uncertain if that is just for integers and fps
or all numeric types.
Received on 2025-04-15 08:11:31