title: Initializing a static const vector of vectors in Visual Studio 2012
body: <p>I am trying to create a <strong>static const vector of const vectors of ints</strong> (there's gotta be a better way to do this) in Visual Studio 2012 and I can't figure out the proper syntax to initialize it with. I believe 2012 uses a version of C++ that doesn't allow initializers but I don't know how else to accomplish what I want.</p>
  
  <p>I've tried the following in 2013, and it seems to compile ok:</p>
  
  <p><strong>.h:</strong></p>
  
  <pre><code>static const std::vector&lt;const std::vector&lt;int&gt;&gt; PartLibrary;
  </code></pre>
  
  <p><strong>.cpp:</strong></p>
  
  <pre><code>const std::vector&lt;const std::vector&lt;int&gt;&gt; Parts::PartLibrary {
      std::vector&lt;int&gt; { 29434 }, // 1
      std::vector&lt;int&gt; { 26322 }, // 2
  ...
  }
  </code></pre>
  
  <p>However, when I try the same in 2012, it errors out:</p>
  
  <pre><code>Error   1   error C2470: 'PartLibrary' : looks like a function definition, 
  but there is no parameter list; skipping apparent body
  </code></pre>
  
  <p>How can I properly initialize this? Is there a more appropriate data type out there I can use? I simply want my static class to have a constant vector of vectors of ints so I can quickly read, but not modify, values.</p>