title: How to create a compile-time static class type that initializes a member container with specific values?
body: <p>This is basically what I want:</p>
  
  <pre><code>struct Item{
     int id;
     std::string s;   
  };
  
  template &lt;???&gt;
  struct StaticContainer
  {
      static const std::deque&lt;Item&gt; _items;
  };
  
  template &lt;???&gt;
  const std::deque&lt;Item&gt; StaticContainer&lt;&gt;::_items {???};
  </code></pre>
  
  <p>Doesn't have to be a <code>deque</code>, I just want to associate an iterable list of values with a <code>type</code>. So that I can do stuff like</p>
  
  <pre><code>typedef StaticContainer&lt;{{1, "a", {2, "b"}, {3, "c"}}&gt; T1;
  typedef StaticContainer&lt;{{0, "e"}, {-1, "f"}, {-2, "g"}}&gt; T2;
  
  int main() {
     T1 t1;
     T2 t2;
     t1 = t2; // Error: incompatible types
  
     return 0;
  }
  </code></pre>
  
  <p>Usually it's making things dynamic that's the problem, but apparently it's just as hard to to make some dynamic things to be compile-time.
  I do not want to use inheritance, polymorphism and similar runtime, overhead-inducing approaches.</p>