1

Ideally, given something like this:

template <typename A, typename B, typename C>
concept A = ...

template <typename T, concept SomeConcept>
concept AssertAnotherConcept = ...

I would like to do something like this:

template <AssertAnotherConcept<A> TA>
class SomeClass {}

The problem is, it's impossible to pass a concept to another concept (although you can cheat about it a little, but I still feel a bit uneasy) and even so, I need to do the actual assertion (probably something like this).

Is there a more built-in way to do this? What is the cleanest way?

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437

0 Answers0