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++/53464] Invalid default value for non-type template parameter is accepted


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).


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