This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53464] Invalid default value for non-type template parameter is accepted
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 24 May 2012 07:19:28 +0000
- Subject: [Bug c++/53464] Invalid default value for non-type template parameter is accepted
- Auto-submitted: auto-generated
- References: <bug-53464-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53464
Daniel KrÃgler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler at
| |googlemail dot com
--- Comment #1 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> 2012-05-24 07:19:28 UTC ---
I don't see why the expression A::get() should not be a converted constant
expression of the type of the template parameter, please be more specific. The
rationale provided in the referenced link does not sound convincing to me.
In the context of the instantiation the expression A::get() is a prvalue core
constant expression of int type, thus it is a literal constant expression of
int type. It is also a converted constant expression of type int, because
A::get() already has the type int (after instantiation).