Title
template in base class specifier
Status
c++17
Section
13.3 [temp.names]
Submitter
Mark Mitchell

Created on 2001-08-23.00:00:00 last changed 33 months ago

Messages

Date: 2017-03-15.00:00:00

Proposed resolution (March, 2017):

This issue is resolved by the resolution of issue 1710.

Date: 2014-01-15.00:00:00

Additional note (January, 2014):

See also issue 1710.

Date: 2010-08-15.00:00:00

Additional note (August, 2010):

The same considerations apply to mem-initializer-ids, as noted in issue 1019.

Date: 2002-04-15.00:00:00

Notes from the 4/02 meeting:

We agreed that template must be allowed in this context. The syntax needs to be changed. We also opened the related issue 343.

Date: 2022-02-18.07:47:23

Suggested resolution:

It seems to me that a consistent approach to the solution that looks like it will be adopted for issue 180 (which deals with the typename keyword in similar contexts) would be to assume that B is a template if it is followed by a "<". After all, an expression cannot appear in this context.
Date: 2017-02-15.00:00:00

[Adopted at the February/March, 2017 meeting.]

The EDG front-end accepts:

template <typename T>
struct A {
  template <typename U>
  struct B {};
};

template <typename T>
struct C : public A<T>::template B<T> {
};

It rejects this code if the base-specifier is spelled A<T>::B<T>.

However, the grammar for a base-specifier does not allow the template keyword.

History
Date User Action Args
2022-02-18 07:47:23adminsetmessages: + msg6674
2018-02-27 00:00:00adminsetstatus: drafting -> c++17
2017-02-06 00:00:00adminsetstatus: review -> drafting
2014-11-24 00:00:00adminsetstatus: ready -> review
2014-03-03 00:00:00adminsetmessages: + msg4843
2014-03-03 00:00:00adminsetstatus: drafting -> ready
2014-01-20 00:00:00adminsetmessages: + msg4746
2010-08-23 00:00:00adminsetmessages: + msg2864
2002-05-10 00:00:00adminsetmessages: + msg644
2002-05-10 00:00:00adminsetstatus: open -> drafting
2001-08-23 00:00:00admincreate