fork download
  1. #include <memory> // for std::unique_ptr
  2. #include <utility> // for std::move
  3. #include <vector> // for std::vector
  4.  
  5. struct bar {};
  6.  
  7. struct foo
  8. {
  9. using vtype = std::vector<std::unique_ptr<bar>>;
  10. foo(vtype v) : _v(std::move(v)) { }
  11. private:
  12. vtype _v;
  13. };
  14.  
  15. int main()
  16. {
  17. foo::vtype v;
  18. foo x(std::move(v));
  19. }
Success #stdin #stdout 0s 2892KB
stdin
Standard input is empty
stdout
Standard output is empty