title: Methods not called when instantiating a new class
body: <p>In Dog.cpp, I have this macro outside the class scope:</p>
  
  <pre><code>BEGIN_SETPARAM_MAP(Dog)
      MAP_SETPARAM(eParam_Macro_Eat,      Eat)
      MAP_SETPARAM(eParam_Macro_Walk,     Walk)
      MAP_SETPARAM(eParam_Macro_Sleep,    Sleep)
  END_GETPARAM_MAP(Dog)
  
  class Dog : public Animal
  {
     HRESULT init()
     {
        //When using this, macros above are not called (BEGIN_SETPARAM_MAP, MAP_SETPARAM and END_GETPARAM_MAP)
        auto animal = std::make_unique&lt;Animal&gt;();
        animal-&gt;Init();
  
       //But when directly calling the method via a namespace, the macros were being called
      //Animal::Init();
     }
  };
  </code></pre>
  
  <p>The implementation of the macros is in Animals.hpp:</p>
  
  <pre><code>
  class Animal
  {
  public:
     HRESULT Init()
     {
        //some implementation
        return S_OK;
     }
  
  protected:
     HRESULT  MapSetParamHandler(ULONG paramId, ParamValueHandler handler);
     virtual void SetupSetParamMap(void) {}
  };
  
  #define BEGIN_SETPARAM_MAP(className)   void className::SetupSetParamMap(void) {typedef className ThisClass;
  #define MAP_SETPARAM(paramId, handler)  MapSetParamHandler(paramId, static_cast&lt;ParamValueHandler&gt;(&amp;ThisClass::handler));
  #define END_SETPARAM_MAP(className)     }
  </code></pre>
  
  <p>Any idea why the macros are not called when using the first implmentation? I have also tried the following but all do not call the macros:</p>
  
  <pre><code>Animal animal;
  animal.Init();
  //----
  Animal* animal = new Animal;
  animal-&gt;Init();
  </code></pre>
  
  <p>Any thoughts??</p>