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


2037. Alias templates and template declaration matching

Section: 13.6  [temp.type]     Status: drafting     Submitter: Richard Smith     Date: 2014-11-06

For the following example,

  template<int N> struct A {};
  template<short N> using B = A<N>;
  template<int N> void f(B<N>) {} // #1
  template<int N> void f(A<N>) {} // #2

There is implementation variance as to whether there is one f or two. As with previously-discussed cases, these have different SFINAE effects, perhaps equivalent but not functionally equivalent. Should the argument to #1 be treated as something like A<(int)(short)N> and not just A<N>.

See also issues 1668 and 1979.