Код: Выделить всё
class Hub
{
public:
Hub ();
template
Wire& get_wire ()
{
return wires[typeid(T)];
}
private:
std::map
Подробнее здесь: [url]https://stackoverflow.com/questions/79665099/can-i-create-a-member-function-template-to-return-instances-of-a-class-template[/url]
Мобильная версия