c++ - std::unique_ptr structure member to the structure type -
is
struct { std::unique_ptr<a> a; };
allowed standard? don't think container types std::set
there special unique_ptr
?
yes, it's explicitly allowed. c++14 (n4140) 20.8.1/5:
... template parameter
t
ofunique_ptr
may incomplete type.
it allowed std::shared_ptr
, std::weak_ptr
, using similar wording.
Comments
Post a Comment