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

2024-11-11


2025. Declaration matching via alias templates

Section: 13.7.7.2  [temp.over.link]     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.