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++/25503] g++ accepts invalid typedef in template code



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


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