title: Are placeholders types of non-type template parameters interchangeable in case of template template parameter
body: <p>Consider a simple example:</p>
  
  <pre><code>int x;
  
  template &lt;template &lt;auto&gt; class TT&gt;
  struct Foo {
     void foo() {
        TT&lt;(x)&gt; tt;
        static_cast&lt;void&gt;(tt);
     }
  };
  
  template &lt;decltype(auto)&gt;
  struct Bar { };
  
  
  int main() {
      Foo&lt;Bar&gt; foobar;
      foobar.foo();
  }
  </code></pre>
  
  <p><a href="https://wandbox.org/permlink/8ONvvMTCTqW7Aenm" rel="noreferrer">[clang]</a> seems to deal with the idea of <code>decltype(auto)</code> placeholder despite the use of <code>auto</code> in template template parameter declaration without a problem. </p>
  
  <p><a href="https://wandbox.org/permlink/7THzOxieKVDoi1Gk" rel="noreferrer">[gcc]</a> on the other hand - not very well:</p>
  
  <blockquote>
    <p>prog.cc:6:13: error: the value of 'x' is not usable in a constant expression</p>
  </blockquote>
  
  <hr>
  
  <p>As usually - which behaviour is expected according to standard? Or maybe everything is possible and the code is ill-formed (this time I suppose not but cannot rule it out definitively)?</p>
  
  <p>PS. Sorry for breaking one of the compilers again ;)</p>