This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: locale/file/style questions
> > 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.
Lately I finally switched back to all-public-at-the-end. All the
compilers I use are compliant enough to figure it out; and it is an
incredibly useful practice when the clients of your code are idiots, for
readability alone.
--
pedwards@ball.com Ball Aerospace & Technologies Corp.
(937-320-4048) Advanced Systems & Technology Operations