Skip to content

Commit b345505

Browse files
ChuanqiXu9tkoeppe
authored andcommitted
[temp.param] Delete outdated wording at p15
The wording at [temp.param]/15 says: > A template-parameter shall not be given default arguments by two > different declarations if one is reachable from the other. But it is conflicted with [basic.def.odr]/13: > There can be more than one definition of a > ... > default template argument > ... > in a program provided that each definition appears in a different > translation unit and the definitions satisfy the [same-meaning > criteria of the ODR]. [temp.param] should be deleted otherwise we couldn't modularize a real project.
1 parent e1bfc25 commit b345505

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

source/templates.tex

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -558,17 +558,6 @@
558558
\end{codeblock}
559559
\end{example}
560560

561-
\pnum
562-
A \grammarterm{template-parameter}
563-
shall not be given default arguments by two different declarations
564-
if one is reachable from the other.
565-
\begin{example}
566-
\begin{codeblock}
567-
template<class T = int> class X;
568-
template<class T = int> class X { @\commentellip@ }; // error
569-
\end{codeblock}
570-
\end{example}
571-
572561
\indextext{\idxcode{<}!template and}%
573562
\pnum
574563
When parsing a

0 commit comments

Comments
 (0)