This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112e. See for the official list.


2025. Declaration matching via alias templates

Section:  []     Status: dup     Submitter: Richard Smith     Date: 2014-10-17

Consider the following example:

  template<typename ...T> struct X { void f(); static int n; };
  template<typename T, typename U> using A = T;
  template<typename ...T> void X<A<T, decltype(sizeof(T))>...>::f() {}
  template<typename ...T> void X<A<T, decltype(sizeof(T))>...>::n = 0;
  void g() { X<void>().f(); X<void>::n = 1; }

Should this be valid? The best answer would seem to be to produce an error during instantiation, and that appears to be consistent with the current Standard wording, but there is implementation divergence.

See also issue 2021.

Rationale (May, 2015):

This issue is a duplicate os issue 1979.