title: Does the standard consider non-template members of template classes to be "templates" themselves?
body: <p>Consider following code:</p>
  <pre><code>#include &lt;type_traits&gt;
  
  template &lt;typename T&gt; struct A
  {
      static_assert(!std::is_same_v&lt;int, T&gt;);
  };
  
  template&lt;typename T&gt; struct B
  {
      void foo()
      {
          A&lt;int&gt;{};
      }
  };
  
  int main() {}
  </code></pre>
  <p>It comes from <a href="https://ru.stackoverflow.com/questions/915701/">this question</a> on russian StackOverflow, which asks whether it's valid or not.</p>
  <p>I attempted to reference this:</p>
  <blockquote>
  <h3><a href="http://eel.is/c++draft/temp.res#8.1" rel="noreferrer">[temp.res]/8.1</a></h3>
  <p><sup>8</sup> The validity of a template may be checked prior to any instantiation. [ Note: Knowing which names are type names allows the syntax of every template to be checked in this way. — end note ] <strong>The program is ill-formed, no diagnostic required, if:</strong></p>
  <p><sup>(8.1)</sup> — <strong>no valid specialization can be generated for a template</strong> or a substatement of a constexpr if statement within a template and the template is not instantiated, or</p>
  <p>...</p>
  </blockquote>
  <p><sup>(emphasis mine)</sup></p>
  <p>Since no valid specialization can be generated for <code>foo()</code>, I reasoned that the snippet is ill-formed, NDR.</p>
  <p>But I was told <code>[temp.res]/8.1</code> doesn't apply since <code>foo()</code> itself isn't a template member function.</p>
  <p><a href="https://en.cppreference.com/w/cpp/language/templates#Templated_entity" rel="noreferrer">cppreference</a> calls non-template member functions of template classes &quot;templated entities&quot;, but it seems to be unclear if they can be considered templates themselves.</p>
  <p>Thus, the question is: Does the standard consider non-template members of template classes to be &quot;templates&quot; themselves?</p>