Код: Выделить всё
class Foo;
class Bar;
using Analyzable = std::variant;
class Foo {
public:
Foo(Analyzable f);
private:
Analyzable f;
};
< /code>
Я не уверен, какую часть должна быть шаблона, и что. Я попробовал < /p>
template
using Analyzable = std::variant;
template
class FooTPL : public Analyzable {
Analyzable f;
};
using Foo = FooTPL;
Код: Выделить всё
FooПодробнее здесь: https://stackoverflow.com/questions/796 ... -of-itself
Мобильная версия