title: getting undefined reference to typeinfo for MemoryPool and all of my methods are defined
body: <p>I know the usual cause for this message. However, I don't think that's happening here unless I'm missing something. I think the problem is cropping up because I'm deriving from an abstract base with a template class and it's not resolving all the methods because of that. The trouble is, I don't know how to fix it. I normally try not to mix templates and inheritance, but in this case I need fixed size array buffers and the only other way I know to accomplish this is to use the preprocessor rather than the compiler w/ templates. (Forgive any bugs in the code, I haven't even had a chance to test the proof of concept yet because it won't compile)</p>
  <p>I get this error (clipped slightly):</p>
  <pre><code>In function `pool::MemoryPool::MemoryPool()':
  MemoryPool.hpp:11: undefined reference to `vtable for pool::MemoryPool'
  undefined reference to `typeinfo for pool::MemoryPool'
  </code></pre>
  <p>I've already tried every combination of constructors and destructors (virtual and non) in MemoryPool and StaticMemoryPool to no avail.</p>
  <p>Any help?</p>
  <p>Thanks in advance.</p>
  <p>here's the code:</p>
  <pre><code>struct MemoryPool {
      virtual void* alloc(const size_t size)=0;
      virtual void freeAll()=0;
      virtual void* next();
      virtual size_t capacity()=0;
      virtual size_t used()=0;
  };
  template&lt;size_t C&gt; class StaticMemoryPool : public MemoryPool {
      uint8_t _heap[C];
      uint8_t *_next;
  public:
      void* alloc(const size_t size) override {
          if(used()+size&gt;=C)
              return nullptr;
          void* result = _next;
          _next+=size;
          return result;
      }
      void freeAll() override {
          _next = _heap;
      }
      void *next() override {
          return _next;
      }
      size_t capacity() override { return C; }
      size_t used() override {return _next-_heap;}
      StaticMemoryPool() : _next(_heap) {}
      ~StaticMemoryPool() {}
  };
  </code></pre>