title: Are all constexpr variable implicitly inline?
body: <p>I was playing around with <em>auto template parameters</em> and I was surprised that this code didn't compiled:</p>
  
  <pre><code>constexpr auto bar = 2;
  
  template&lt;auto&amp; T&gt;
  struct Foo {
      auto operator()() const { return T; }
  };
  
  int main() {
      Foo&lt;bar&gt; b;
      b();
  }
  </code></pre>
  
  <p>Visual Studio 15.7 (preview 4) spit out these errors:</p>
  
  <blockquote>
  <pre><code>error C2970: 'Foo': template parameter 'T': 'bar': an expression involving objects with internal linkage cannot be used as a non-type argument
   note: see declaration of 'Foo'
   note: see declaration of 'bar'
  error C2440: 'specialization': cannot convert from 'int' to 'int &amp;'
   note: see reference to class template instantiation 'Foo&lt;0&gt;' being compiled
  error C2973: 'Foo': invalid template argument 'int'
   note: see declaration of 'Foo'
  </code></pre>
  </blockquote>
  
  <p>Then, after adding <code>inline</code>, the error got away!</p>
  
  <pre><code>constexpr inline auto bar = 2;
  </code></pre>
  
  <p>I thought <code>constexpr</code> variables were implicitly <code>inline</code>. Also, how does that affect the linkage of my variable <code>bar</code>?</p>