What would break if class was merged with struct

Ola Fosheim Grøstad via Digitalmars-d digitalmars-d at puremagic.com
Sun May 28 07:40:48 PDT 2017


On Sunday, 28 May 2017 at 14:30:00 UTC, Ola Fosheim Grøstad wrote:
> Struct and class is one type in C++. The difference is in the 
> syntax where the grammar does not allow access protection for 
> the struct keyword. So not semantical, but syntactical.

I.e. you can just search-and-replace "struct" with "class" in C++ 
and it will behave the same way.

"struct" is only used as a mnemonic device...


More information about the Digitalmars-d mailing list