Movatterモバイル変換


[0]ホーム

URL:


Issue 21 - WG21 CWG Issues
Title
Can a default argument for a template parameter appear in a friend declaration?
Status
tc1
Section
13.2 [temp.param]
Submitter
unknown

Created on1998-10-24.00:00:00 last changed277 months ago

Messages

msg231 (view)
Date: 1999-10-15.00:00:00

Proposed resolution (10/00): Add to the end of13.2 [temp.param] paragraph 9,

A defaulttemplate-argument shall not be specified in a friendtemplate declaration.

(See alsoissue 136.)

msg53 (view)
Date: 2022-11-20.07:54:16

13.2 [temp.param] paragraph 10says:

The set of default template-arguments available for use witha template declaration or definition is obtained by merging the defaultarguments from the definition (if in scope) and all declarations in scopein the same way as default function arguments are (9.3.4.7 [dcl.fct.default])."
Can a default argument for a template argument appear in a friend declaration?If so, when is this default argument considered for template instantiations?

For example,

    template<class T1, class T2 = int> class A;    class B {        template<class T1 = int, class T2> friend class A;    };
Is this well-formed? If it is, should the IS say when the default argumentforT1 is considered for instantiations of classA?

Proposed resolution (10/00): Add to the end of13.2 [temp.param] paragraph 9,

A defaulttemplate-argument shall not be specified in a friendtemplate declaration.

(See alsoissue 136.)

History
DateUserActionArgs
2003-04-25 00:00:00adminsetstatus: dr -> tc1
2000-11-18 00:00:00adminsetstatus: ready -> dr
2000-05-21 00:00:00adminsetstatus: review -> ready
2000-02-23 00:00:00adminsetmessages: +msg231
2000-02-23 00:00:00adminsetstatus: open -> review
1998-10-24 00:00:00admincreate

[8]ページ先頭

©2009-2026 Movatter.jp