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 of unique_ptr may incomplete type.

it allowed std::shared_ptr , std::weak_ptr, using similar wording.


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -