[Bug c++/25503] g++ accepts invalid typedef in template code
d dot bonekaemper at rtsgroup dot net
gcc-bugzilla@gcc.gnu.org
Tue Dec 20 12:28:00 GMT 2005
------- Comment #1 from d dot bonekaemper at rtsgroup dot net 2005-12-20 12:28 -------
(Sorry, pressed return to early...)
g++ accepts the following code, which contains a typedef that's supposed to act
as a static assert.
-------------------------------------------------------------------------------
template<int N>
struct Test
{
Test()
{
typedef struct StaticAssert {unsigned condition : (N); } XXX;
}
};
int
main()
{
Test<0> T;
}
-------------------------------------------------------------------------------
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25503
More information about the Gcc-bugs
mailing list