fork(1) download
  1. #include <string>
  2.  
  3. template <typename T>
  4. class Test {
  5. public:
  6. template< class... Args >
  7. Test(Args&&... args) : value_ (new T{args...}) {}
  8.  
  9. private:
  10. T* value_;
  11. };
  12.  
  13. int main() {
  14. Test<std::string> test1("Text");
  15. Test<std::string> test2(std::string("Text"));
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
Standard output is empty