This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: Coding standards
- To: libstdc++ at sourceware dot cygnus dot com
- Subject: Re: Coding standards
- From: Nathan Myers <ncm at best dot com>
- Date: Tue, 30 Nov 1999 17:34:33 -0800 (PST)
- Reply-To: libstdc++ at sourceware dot cygnus dot com
Jason wrote:
> I've finally gotten around to reading the libstdc++ coding standards,
> and would like to discuss some of them.
>
> 7) Perhaps the member-init-list should be indented?
That is reasonable, except then
Type
qualified::really_long_function_name(
really_long_argument_type a)
: initializers()
{
}
seems to put the initializers with the arguments, rather
than with the class body.
> 8) Why not
>
> try
> {
> ...
> }
> catch (...)
> {
> ...
> }
>
> ? This is consistent with the C form for 'if' and such; the documented form
> seems gratuitously inconsistent.
No good reason. Probably it should be made consistent.
> 9) I disagree strongly. Declarations are all in one line in C, and member
> function declarations should work the same way. I see that people have
> been ignoring this rule anyway.
The point here was not about the (optional!) line-break in the declaration,
but rather about indentation under a template declaration in a class body.
Nathan Myers
ncm@cantrip.org