Extensible enum class
The following example demonstrates this:
enum class Vehicle {
CAR,
BUS,
};
void drive(Vehicle vehicle);
enum class Transport : Vehicle {
SHIP,
PLANE,
};
void travel(Transport transport);
The enum Transport is then a strict superset.
One can travel using any vehicle, but also by other
means of transport, such as a ship or an airplane.
Of course, this is not a valid C++ code.
template <typename TDerived, typename TBase>
struct IsExtended {
static constexpr bool value = false;
};