Title
Template parameter with a default argument that refers to itself
Status
tc1
Section
13.8.4 [temp.dep.res]
Submitter
unknown

Created on 1998-10-24.00:00:00 last changed 255 months ago

Messages

Date: 1999-04-15.00:00:00

Proposed Resolution (04/99):

[Note: the following wording will be superseded by the resolution of issue 187, if approved.]

Change 14.1  temp.param paragraph 14 from:

A template-parameter cannot be used in preceding template-parameters or their default arguments.
to:
A template-parameter cannot be used in preceding template-parameters, in their default arguments, or in its own default argument.
Date: 2004-09-10.00:00:00

13.2 [temp.param] paragraph 13 says:

The scope of a template-parameter extends from its point of declaration until the end of its template. In particular, a template-parameter can be used in the declaration of subsequent template-parameters and their default arguments.
Is the following well-formed?
    template<class U = U> class X { ... };

[Note: this issue is resolved by the resolution of issue 187.]

History
Date User Action Args
2003-04-25 00:00:00adminsetstatus: dr -> tc1
1999-09-14 00:00:00adminsetmessages: + msg211
1999-09-14 00:00:00adminsetstatus: review -> dr
1998-10-24 00:00:00admincreate