You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Eric Lemings <Er...@roguewave.com> on 2008/07/02 23:41:32 UTC
RE: svn commit: r672395 - in /stdcxx/branches/4.3.x/include: functional rw/_ref_wrap.h
> -----Original Message-----
> From: Martin Sebor [mailto:msebor@gmail.com] On Behalf Of Martin Sebor
> Sent: Saturday, June 28, 2008 2:51 PM
> To: dev@stdcxx.apache.org
> Subject: Re: svn commit: r672395 - in
> /stdcxx/branches/4.3.x/include: functional rw/_ref_wrap.h
>
...
>
> 5. The definitions of even trivial non-empty functions should
> never appear on the same line as the function signature. I.e.,
> the above should be:
>
> type& get() const {
> _RWSTD_ASSERT (0 != _C_ptr);
> return *_C_ptr;
> }
I assume empty function definitions are exempted from this convention?
Brad.
RE: svn commit: r672395 - in /stdcxx/branches/4.3.x/include: functional rw/_ref_wrap.h
Posted by Eric Lemings <Er...@roguewave.com>.
> -----Original Message-----
> From: Eric Lemings
> Sent: Wednesday, July 02, 2008 3:42 PM
> To: 'dev@stdcxx.apache.org'
> Subject: RE: svn commit: r672395 - in
> /stdcxx/branches/4.3.x/include: functional rw/_ref_wrap.h
>
>
>
> > -----Original Message-----
> > From: Martin Sebor [mailto:msebor@gmail.com] On Behalf Of
> Martin Sebor
> > Sent: Saturday, June 28, 2008 2:51 PM
> > To: dev@stdcxx.apache.org
> > Subject: Re: svn commit: r672395 - in
> > /stdcxx/branches/4.3.x/include: functional rw/_ref_wrap.h
> >
> ...
> >
> > 5. The definitions of even trivial non-empty functions should
> > never appear on the same line as the function signature. I.e.,
> > the above should be:
> >
> > type& get() const {
> > _RWSTD_ASSERT (0 != _C_ptr);
> > return *_C_ptr;
> > }
>
> I assume empty function definitions are exempted from this convention?
>
Hey... I also see one-line trivial functions in <limits>, <set>, and
<vector> headers.
Brad.
Re: svn commit: r672395 - in /stdcxx/branches/4.3.x/include: functional
rw/_ref_wrap.h
Posted by Martin Sebor <se...@roguewave.com>.
Eric Lemings wrote:
>
>
>> -----Original Message-----
>> From: Martin Sebor [mailto:msebor@gmail.com] On Behalf Of Martin Sebor
>> Sent: Saturday, June 28, 2008 2:51 PM
>> To: dev@stdcxx.apache.org
>> Subject: Re: svn commit: r672395 - in
>> /stdcxx/branches/4.3.x/include: functional rw/_ref_wrap.h
>>
> ...
>> 5. The definitions of even trivial non-empty functions should
>> never appear on the same line as the function signature. I.e.,
>> the above should be:
>>
>> type& get() const {
>> _RWSTD_ASSERT (0 != _C_ptr);
>> return *_C_ptr;
>> }
>
> I assume empty function definitions are exempted from this convention?
Yes. As you noted, there are functions that don't follow this
convention. Most of them are in ancient code that hasn't been
touched in a decade. You can even find code that uses 2 space
indents, or that drops the opening curly brace (e.g., after
an if or else). <vector>, esp. vector<bool>, is an example.
At some point in the future it would be nice to reformat this
code to follow the prevailing convention.
Martin