title: C++ template - several specializations - is behaviour defined?
body: <p>Let's imagine I declare a templated structure:</p>
  
  <pre><code>template &lt;int N&gt; struct mystruct;
  </code></pre>
  
  <p>Let's imagine my structure has a general behavior for all <code>N</code>, except when <code>N == 0</code></p>
  
  <p>I can declare for instance a special behavior for <code>N == 0</code> with:</p>
  
  <pre><code>template&lt;&gt; struct mystruct&lt;0&gt; {int k = 0};
  </code></pre>
  
  <p>I can also declare the general behaviour with:</p>
  
  <pre><code>template&lt;int N&gt; struct mystruct {float k = 3.14;};
  </code></pre>
  
  <p>If I run in the main:</p>
  
  <pre><code>struct mystruct&lt;-1&gt; x;
  struct mystruct&lt;0&gt; y;
  struct mystruct&lt;1&gt; z;
  std::cout &lt;&lt; x.k &lt;&lt; " " &lt;&lt; y.k &lt;&lt; " " &lt;&lt; z.k &lt;&lt; std::endl;
  </code></pre>
  
  <p>I get what I want : <code>3.14 0 3.14</code>, whatever the order of template declarations.</p>
  
  <p>However I am wondering if this behavior is insured. Indeed, when I declare:</p>
  
  <p><code>struct mystruct&lt;0&gt; y;</code></p>
  
  <p>In my mind, this could as well be defined by both <code>mystruct</code> implementations.</p>
  
  <p>So the question is:</p>
  
  <p><em>Does C++ normalization ensure the template specialization <code>&lt;0&gt;</code> to override the general basic implementation <code>&lt;int N&gt;</code>, whatever the templates specialization order in the code is?</em></p>