title: type_info attempt to reference deleted function
body: <p>I'm attempting to store a collection of objects (all inherit from the base <code>acorn::Component</code>).
  However, in my <code>AddComponent</code> function, I keep getting this error:</p>
  
  <p><code>error C2280: 'type_info::type_info(const type_info &amp;)' : attempting to reference a deleted function</code></p>
  
  <p>I'm not sure why I am getting this error, as I do not have any deleted functions in either my <code>Component</code> classes or the class that stores all <code>Component</code> objects.</p>
  
  <p>Here is the function that is giving me problems. It should add the <code>Component</code> to the map:</p>
  
  <pre><code>        template&lt;typename T&gt;
          void AddComponent(T* component)
          {
  #ifdef _DEBUG
              SDL_Log("acorn::Entity::AddComponent called!");
  #endif
              std::pair&lt;std::type_index, acorn::Component*&gt; myPair = std::make_pair(typeid(T), component);
              mComponentMap.insert(myPair);
          }
  </code></pre>
  
  <p>And here are the component classes:</p>
  
  <pre><code>namespace acorn
  {
      struct Component
      {
      };
  
      struct PositionComponent : public acorn::Component
      {
          SDL_Rect positionRect;
          float x;
          float y;
          uint32_t ID;
  
          PositionComponent() : x(0.0f), y(0.0f), ID(0)
          {
  
          }
      };
  
      struct VelocityComponent : public acorn::Component
      {
          float xVel;
          float yVel;
          uint32_t ID;
  
          VelocityComponent() : xVel(0.0f), yVel(0.0f), ID(1)
          {
  
          }
      };
  
      struct SpriteComponent : public acorn::Component
      {
          SDL_Rect spriteRect;
          SDL_Texture* sprite;
          uint32_t ID;
  
          SpriteComponent() : ID(0)
          {
              spriteRect.x = 0;
              spriteRect.y = 0;
              spriteRect.h = 32;
              spriteRect.w = 32;
  
              sprite = nullptr;
          }
      };
  }
  </code></pre>
  
  <p>The only thing I can think of is that this has something to do with structs, but I can not find anything that confirms this. Any ideas?</p>