title: Return templated smart pointer from constructor-like calls
body: <p>I want to write some easy-to-call object initializiation and I would like those objects to be shared_ptr of MyClass.</p>
  
  <p>Just for visualisiation purposes, imagine this class:</p>
  
  <pre><code>class MyClass
  {
  public:
    MyClass(int number);
    MyClass(wxString path);
  }
  
  int main()
  {
    //For now, objects are created in c style like this:
    MyClass obj1("C:\\test");
    MyClass * obj2 = new MyClass(5);
  }
  </code></pre>
  
  <p>Now I would like to change this with easy to use smart pointer initialization.
  My goal is something looking like a constructor call, so that very little has to be changed to update the old call to the new one:</p>
  
  <pre><code>Smart_MyClass obj1("C:\\test");
  Smart_MyClass obj2(5);
  //where Smart_MyClass is std::shared_ptr&lt;MyClass&gt; 
  </code></pre>
  
  <p>I could solve this with a function:</p>
  
  <pre><code>template&lt;typename T&gt;
  inline Smart_MyClass Smart_MyClass_Fct(T t)
  {
      return std::make_shared&lt;MyClass&gt;(t);
  };
  
  Smart_MyClass obj = Smart_MyClass_Fct(7);
  </code></pre>
  
  <p>How can I translate that into the form I need? I could think of using the operator(), that would require a struct/class and maybe inheritence of my actual class? And maybe casting it back to parent class?
  Pretty sure there is something more elegant. ;-) </p>