摘要: 直接结合代码讲解: //先在工厂使用前注册标签和创建功能 Factory<CreateAnimal> farm; farm.subscribe("CAT", [](const std::string & n) { return std::make_unique<Cat>(n); });///< st 阅读全文