Код: Выделить всё
module;
#include
export module A;
class A {
constexpr std::unique_ptr generate(int i);
};
Код: Выделить всё
export module B;
class B: public A {
};
Код: Выделить всё
constexpr std::unique_ptr A::generate(int i)
{
if(i == 0) {
std::unique_ptr b = std::make_unique();
b.configure(/* do something */);
return b;
}
/* and so on */
}
Как бы вы посоветовали мне действовать?
Подробнее здесь: https://stackoverflow.com/questions/787 ... r-function