This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/72842] non-type template-parameter of type void


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72842

--- Comment #5 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
(In reply to Barry Revzin from comment #4)
> I'll just email. Instantiating foo<void> creates a function template with a
> non-type template parameter of type void. That's not an allowed type of a
> non-type template parameter, so I think it should be ill-formed.

It truely is ill-formed, but the question is whether an implementation is
required to diagnose it. For the non-depending case the diagnostics is a hard
requirement. But for the dependent case we have [temp.res] p8:

"The program is ill-formed, no diagnostic required, if:
[..]
— every valid specialization of a variadic template requires an empty template
parameter pack, or [..]"

My argument is that this is the case we are entering here: Ill-formed, but no
diagnostics required.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]