Код: Выделить всё
#include
template
concept only_on_double = requires() {
std::is_same_v;
};
struct Base1 {
enum enum1 { A = 1 };
};
struct Base2 {
enum enum2 { B = 2 };
};
template
struct Derived : private Base1, private Base2 {
using enum Base1::enum1;
// is the following planned? If not, maybe why?
using enum Base2::enum2 requires only_on_double;
};
int main() {
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79716728/are-there-plans-to-allow-requires-clauses-to-using-declarations-in-c[/url]