title: Template non-type arguments for reference type and odr-used
body: <p>Is the variable <code>v</code> in the sample code below <em>odr-used</em>?</p>
  
  <pre><code>extern void* v;
  
  template&lt;void*&amp;&gt;
  void f() {}
  
  int main()
  {
      f&lt;v&gt;();
  }
  </code></pre>
  
  <p>I found this pattern in Boost ML.</p>
  
  <p>cf. <a href="http://lists.boost.org/Archives/boost/2011/04/180082.php" rel="noreferrer">http://lists.boost.org/Archives/boost/2011/04/180082.php</a></p>
  
  <p>It says that the <code>boost::enabler</code> is never defined, but <strong>clang</strong> rejects it as a linkage error if <code>-g</code> option is provided.</p>
  
  <p>cf. <a href="http://melpon.org/wandbox/permlink/nF45k7un3rFb175z" rel="noreferrer">http://melpon.org/wandbox/permlink/nF45k7un3rFb175z</a></p>
  
  <p>The sample code above is reduced version of the Boost ML's code and <strong>clang</strong> rejects it too.</p>
  
  <p>cf. <a href="http://melpon.org/wandbox/permlink/ZwxaygXgUhbi1Cbr" rel="noreferrer">http://melpon.org/wandbox/permlink/ZwxaygXgUhbi1Cbr</a></p>
  
  <p>I think (but I am not sure) that template non-type arguments for reference type are <em>odr-used</em> even if they are not referred in their template body so the Boost ML's pattern is ill-formed.</p>
  
  <p>Is my understanding correct?</p>