[lug] g++ on FC2, turning off false warning

Ted Logan ted.logan at gmail.com
Mon Jul 11 21:19:38 MDT 2005


On 7/11/05, D. Stimits <stimits at comcast.net> wrote:
> this was a mass search/replace typo. He had replaced a lot of structs
> with classes, and got carried away...those classes were actually
> intended to be structs. Which of course fixes that warning!

Technically speaking, structs in C++ are identically equal to classes
with members defaulting to public, not private. It's therefore legal
to have structs with constructors, destructors, and member functions.
Although I wouldn't recomend doing so to avoid confusing future
readers of one's code. :)

-- 
Ted Logan
Finally-employed Engineer
ted.logan at gmail.com
http://jaeger.festing.org/



More information about the LUG mailing list