This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-12-19


2275. Type-dependence of function template

Section: 13.8.3.3  [temp.dep.expr]     Status: drafting     Submitter: Jason Merrill     Date: 2016-06-21

Consider:

  struct B { template <class T> void h(); };
  template <class T> struct A {
    template <class U> static U f(U);
    void g() {
     f(B()).h<int>(); // OK, f(B()) is non-type-dependent with type B.
    }
  }; 

A member template ought to be dependent only if it depends on template parameters of the current scope, but 13.8.3.3 [temp.dep.expr] paragraph 3 is silent on the matter.