Date: Sat, 20 Jun 2026 02:32:26 +0300
On Sat, 20 Jun 2026 at 02:26, amngis_21d38 via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> Why don't C++ designers turn concepts into entities, design a function to convert a concept into a class
Because there hasn't been a good explanation what these things would mean.
> or make aconstexpr function capable of having a concept parameter?
Like this? https://godbolt.org/z/rWT9T6q4z
template <class T> concept jones = false;
template <template <class> concept C> void f()
{
static_assert(!C<int>);
}
int main()
{
f<jones>();
}
Introduced by https://wg21.link/p2841 into C++26.
<std-proposals_at_[hidden]> wrote:
>
> Why don't C++ designers turn concepts into entities, design a function to convert a concept into a class
Because there hasn't been a good explanation what these things would mean.
> or make aconstexpr function capable of having a concept parameter?
Like this? https://godbolt.org/z/rWT9T6q4z
template <class T> concept jones = false;
template <template <class> concept C> void f()
{
static_assert(!C<int>);
}
int main()
{
f<jones>();
}
Introduced by https://wg21.link/p2841 into C++26.
Received on 2026-06-19 23:32:44
