title: Pattern with pure virtual functions getting advantage of polymorphism
body: <p>Suppose the following code:</p>
  <pre><code>struct Piece_t {
      virtual ~Piece_t() = default;
      std::string type;
  };
  
  struct Empty_t : Piece_t {
      Empty_t() { };
      bool run() { return false; };
  };
  
  struct Pawn_t : Piece_t {
      Pawn_t() {
          type = &quot;Pawn&quot;;
      }
      bool move() {
          return false;
      }
  };
  
  struct Board_t {
      using Cols = std::vector&lt;Piece_t&gt;;
      using Board = std::vector&lt;Cols&gt;;
      Board_t(size_t N = 8) : b{ Board(N, Cols(N, Empty_t())) } {
          for (size_t i = 0; i &lt; N; i++) {
              b[1][i] = Pawn_t();
              b[N - 2][i] = Pawn_t();
          }
          //more init's here...
      }
      Board b;
  };
  </code></pre>
  <p>Here I have a <code>Piece_t</code>, and Im creating a <code>Board_t</code>, which has a <code>std::vector&lt;std::vector&lt;Piece_t&gt;&gt;</code>.
  Fair enough, however, now suppose that I want to add a pure virtual function to <code>Piece_t</code>, like <code>move</code>:</p>
  <pre><code>struct Piece_t {
      virtual bool move() = 0;
      virtual ~Piece_t() = default;
      std::string type;
  };
  </code></pre>
  <p>Doing this, however, is going to give me compilation errors, because I can not instantiate a <code>std::vector&lt;Piece_t&gt;</code> like I do in <code>Board</code>. This seems strange to me, because I'm actually doing an init with <code>Empty_t</code>, and not with <code>Piece_t</code>.
  So here are my questions:</p>
  <ol>
  <li>Why is not letting me to compile the code with this modification? Suppose that I' have already implemented <code>move</code> in the other two structs.</li>
  <li>What should be the correct pattern to create the desired behaviour? (Being creating a base class with a virtual pure funct. and later using that definition to getting advantage of polymorphism.</li>
  </ol>