模板类A里面有个内部类Node
template<typename T>
class A
{
.....
private:
struct Node
{
std::array<std::unique_ptr<Node>, 4> children; // 报错
std::vector<T> values;
};
std::unique_ptr<Node> mRoot;
....
};
error C2079: 'A::Node::children' uses undefined class 'std::array<std::unique_ptr<A::Node,std::default_delete<_Ty>>,4>'
with
[
T=StackNode *
]
用的是VS2017, 打开了c++17支持
--
修改:anything1999 FROM 114.249.195.*
FROM 114.249.195.*