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

2024-10-26


1444. Type adjustments of non-type template parameters

Section: 13.2  [temp.param]     Status: drafting     Submitter: Johannes Schaub     Date: 2012-01-15

The type adjustment of template non-type parameters described in 13.2 [temp.param] paragraph 8 appears to be underspecified. For example, implementations vary in their treatment of

  template<typename T, T[T::size]> struct A {};
  int dummy;
  A<int, &dummy> a;

and

  template<typename T, T[1]> struct A;
  template<typename T, T*> struct A {};
  int dummy;
  A<int, &dummy> a;

See also issues 1322 and 1668.

Additional note, February, 2021:

See the discussion regarding top-level cv-qualifiers on template parameters when determining the type in this compiler bug report.