title: initializing a vector based on a 2d array
body: <p>I have a Visual Studio 2008 C++03 application where I would like to initialize a std::vector based on a two dimensional array.</p>
  
  <p>For example:</p>
  
  <pre><code>#define DATA_SIZE 6
  
  struct Data
  {
      UINT a;
      BYTE b;
      BYTE c;
      BYTE d;
  
      Data()
          : /* initialize all members to 0*/
      {
      };
  
      explicit Data( const BYTE data[ DATA_SIZE ] )
          : a( data[ 0 ] &lt;&lt; 16 | data[ 1 ] &lt;&lt; 8 | data[ 2 ] ),
            b( data[ 3 ] ),
            c( data[ 4 ] ),
            d( data[ 5 ] )
      {
      };
  };
  
  inline bool operator==( const Data&amp; lhs, const Data&amp; rhs )
  {
      return /* true if all members are equal */
  };
  
  int main( int argc, char* argv[] )
  {
      const BYTE source[][ DATA_SIZE ] = 
      {
          { 0x01, 0xfe, 0xaa, 0x01, 0xcc, 0x13 },
          { 0x02, 0xa1, 0x02, 0xbb, 0x02, 0xdd }
      }
  
      // how should this be done?
      std::vector&lt; Data &gt; data_list( source[ 0 ], source[ countof( source) - 1 ] );
  
      ASSERT( data_list[ 0 ] == Data( source[ 0 ] ) );
      ASSERT( data_list[ 1 ] == Data( source[ 1 ] ) );
      return 0;
  }
  </code></pre>
  
  <p>Is there a way to do this without a <code>for</code> loop iterating through each item in the <code>data</code> array and calling <code>push_back</code>?</p>