MUQ  0.4.3
RegisterClassName.h
Go to the documentation of this file.
1 #ifndef REGISTERCLASSNAME_H_
2 #define REGISTERCLASSNAME_H_
3 
4 #include <memory>
5 
6 //this file is based on a snippet: http://pastebin.com/dSTLt7vW
7 
19 namespace muq {
20  namespace Utilities {
21 
22  template<typename T>
24  template<typename... Args>
25  std::shared_ptr<T> operator()(Args... args){return std::make_shared<T>(args...);}
26  };
27 
28  } // namespace Utilities
29 } // namespace muq
30 
31 #endif
std::shared_ptr< T > operator()(Args... args)