Eric Lemings wrote:
-----Original Message-----
From: Martin Sebor [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2008 11:10 AM
To: [email protected]
Subject: Re: svn commit: r675044 - in /stdcxx/branches/4.3.x:
include/rw/_tuple.h include/tuple
tests/utilities/20.tuple.cnstr.cpp
tests/utilities/20.tuple.creation.cpp
tests/utilities/20.tuple.h tests/utilities/20.tuple.helpers.cpp
...
I think the commented out parameter name should be removed.
I don't see
this in existing code, and I personally find it a bit distracting.
I agree. Without a name, it's obvious that the parameter
is unused.
Examples in existing code:
As I said before, you can find examples of pretty much any
style, including two space indents. Are you purposely seeking
out these rare, obscure cases and adopting them in your code
just to make things interesting?
The run_test() function in tests/containers/23.vector.cons.cpp.
Not sure why the names are commented out. Maybe because
the author was intending to use them and didn't and they
got commented out to silence warnings.
Lines 56-64 in tests/containers/23.deque.modifiers.cpp.
They are there because normally, names local to each test
are declared static. In this test (and many others) they
can't be declared static because they are referenced from
template code and no all compilers find time (Sun C++ 5.3
has a bug that prevents it from finding static symbols
referenced from template code). So the /* extern */
comment is a reminder to prevent people from making them
static.
The __rw_smanip member functions in include/iomanip.
This is the { /* empty */ } comment that some style guides
suggest for non-trivial ctors with deliberately empty bodies
to indicate that the body wasn't left empty by accident when
the ctor was stubbed out early in the development of the
class. I don't feel strongly about using this style.
Who did all that? Not me. :) I'm sure there are plenty more examples.
I'm sure there are.
Anyone care to search for all such cases and make it all consistent?
No. Please just adjust your code as suggested.
Thanks
Martin