fork download
  1. #include <iostream>
  2. #include <memory>
  3.  
  4. struct T {
  5. std::string m = "something";
  6. };
  7.  
  8. int main(int, const char **)
  9. {
  10. auto ptr = std::make_unique<T>();
  11. std::cout << ptr->m << std::endl;
  12. return 0;
  13. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
something