When looking at concepts it reminded me of how abstract classes could be a interface for your objects.
I would say it makes sense to consider abstract class as concept as it is just bunch of functions to be implemented.
As compiler is supposed ensure that all pure functions are implemented, it should be easy to treat it as concept.
In some way it would be even easier to check as you only need to ensure that passed type is derived from Abstract class.
While I'm not entirely sure it is a good idea, the same could be used for non-abstract classes.
template<SomeClass DerivedOrSameClass>
void fn( const DerivedOrSameClass& a) {
...
}
The expected behavior would be that passed object should be derived or belong to
SomeClass
In case of Abstract class it can be only derived ofc.
Overall using classes(or only abstract one) can be considered as light version of concepts where user would require only to specify parent class.
With this abstract classes would act as actual interfaces (like in Java or traits in Rust)
User defines bunch of methods in abstract class and just creates template that accepts any derived class in the same way as concepts.