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-27


2974. Non-deduced context for qualified-id naming a template

Section: 13.10.3.6  [temp.deduct.type]     Status: open     Submitter: Hubert Tong     Date: 2024-12-27

(From submission #660.)

Subclause 13.10.3.6 [temp.deduct.type] bullet 5.1 specifies as a non-deduced context:

This does not cover templates named using a qualified-id:

  template <template <typename> class>
  struct B;

  struct C {
    template <typename>
    struct Nested;
  };

  template <typename T>
  void f(T *, B<T::template Nested> *);

  void g(C *cp) {
    f(cp, 0);           // should be OK
  }

Suggested resolution:

Change in 13.10.3.6 [temp.deduct.type] bullet 5.1 as follows: