This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Coding standards


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]