This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: locale/file/style questions
>>>>> Phil Edwards <pedwards@ball.com>:
>> > I suggest that everything public should be before everything private.
>> > That way consumers can read from top down and stop when they see
>> > that the rest of the class definition is private, thus of no concern.
>> Hmm. This is interesting. I posted the original comment just to see if
>> anybody had any strong feelings, or any particular technique that was
>> working well for their own code. Any comments?
> I used to do the exact opposite, in order to satisfy some compilers that
> would puke when public functions operated on private data that were not
> yet declared.
I've used public at the start for readability since I learned this
practice from InterViews in 1989. I've never had any problems with
this practice on various versions and generations of gcc, on Sunpro
C++, or on MSVC++ 4 and 5.