digitalmars.D.bugs - [?bug/feature?] overwriting the .sizeof of structs
- Thomas Kuehne (6/6) Jul 08 2004 struct TestStructSizeof{
- Jarrett Billingsley (9/15) Jul 10 2004 i suppose it's supposed to be legal.. Walter implemented the .sizeof
struct TestStructSizeof{ int sizeof; } TestStructSizeof s; s.sizeof will be 0. Is this a intended feature or a bug?
Jul 08 2004
i suppose it's supposed to be legal.. Walter implemented the .sizeof property as not to conflict with structs that had a .size member.. although you would think that declaring a member function as a keyword should be illegal! though .sizeof isn't really a keyword, is it? it's more of an implicit static member variable. perhaps there should be code to prevent its being overridden.. "Thomas Kuehne" <eisvogel users.sourceforge.net> wrote in message news:ccja6c$18af$1 digitaldaemon.com...struct TestStructSizeof{ int sizeof; } TestStructSizeof s; s.sizeof will be 0. Is this a intended feature or a bug?
Jul 10 2004