title: Custom STL Allocator with a custom constructor
body: <p>I'm using the STL allocator mentioned <a href="http://www.josuttis.com/libbook/memory/myalloc.hpp.html" rel="nofollow">here</a>. <br/>
  The only change I'm making is that I'm inheriting from a base class called Object, and I use base class' new and delete functions for allocation. </p>
  
  <pre><code>    class MyAlloc :public Object{
      ......
      }
  </code></pre>
  
  <p>I want to use the parameterized constructor of the base class which will be based on parameter sent to the STLAllocator, which would be something like this.</p>
  
  <pre><code>    MyAlloc(A *a) : Object(a) {
      ... }
  </code></pre>
  
  <p>And then use this constructor like :</p>
  
  <pre><code>   A *a = new A();
     std::vector&lt;int,MyAlloc&lt;int&gt; (a) &gt; v;
  </code></pre>
  
  <p>I'm not able to achieve this. It is resulting in compilation error :<br/>'a'cannot appear in a constant-expression<br/>  template argument 2 is invalid<br/>Thanks in advance..:)</p>