title: map of boost pools?
body: <p>Basically im giving a very weak shot at trying to centralize memory management. Anyways, boost::pool uses chunks of certain sizes.</p>
  
  <p>My orignal idea, was to overload new and delete, pass the size into a singleton which would go to the corresponding boost pool and alloc from there.</p>
  
  <pre><code>std::map&lt;size_t, boost::pool&lt;&gt; &gt; m_MemPools;
  </code></pre>
  
  <p>Anyways it seems like i cannot have a map of boost pools, since it MSVC9 gives me the following error, </p>
  
  <pre><code>:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\map(173) : error C2512: 'boost::pool&lt;&gt;::pool' : no appropriate default constructor available
  </code></pre>
  
  <p>Why would this be happening?</p>
  
  <p><em>EDIT</em></p>
  
  <p>I solved it, i ended up just wrapping it in a shared_ptr, which resolves the issue.</p>
  
  <p>Just to show something, i do not use [] anymore, and it still gives this error,</p>
  
  <pre><code>class Pooly
  {
  public:
  
      Foo()
      {
      }
  
      void RegisterPool(__in const size_t poolSize)
      {
          if(pools.find(poolSize) == pools.end())
              pools.insert(std::make_pair(poolSize, boost::pool&lt;&gt;(poolSize)));
      }
  private:
      std::map&lt;size_t, boost::pool&lt;&gt; &gt; pools;
  };
  </code></pre>
  
  <p>Im guessing it has to do with std::make_pair? </p>
  
  <p>Etherway wrapping it a smart pointer works fine, shouldnt this be something that should be included in boost pool though?</p>