Title
Non-deduced context for qualified-id naming a template
Status
open
Section
13.10.3.6 [temp.deduct.type]
Submitter
Hubert Tong

Created on 2024-12-27.00:00:00 last changed 1 month ago

Messages

Date: 2024-12-27.18:11:37

Suggested resolution:

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

  • The nested-name-specifier of a type or template that was specified using a qualified-id.
  • ...
Date: 2024-12-27.00:00:00

(From submission #660.)

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

  • The nested-name-specifier of a type that was specified using a qualified-id.
  • ...

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
  }
History
Date User Action Args
2024-12-27 18:11:37adminsetmessages: + msg7934
2024-12-27 00:00:00admincreate