Boost logo

Boost :

From: Dick.Bridges_at_[hidden]
Date: 2003-11-13 11:17:42

My $.02:
template <class T> inline void quell_warning_unused_variable(const T&) {}

IMHO it "reads" better because "unused_variable" qualifies the variable
For example: quell_warning_unused_variable(froggie);

                      Rene Rivera
                      <grafik.list_at_redshift-so To: Boost mailing list <boost_at_[hidden]>
            > cc:
                      Sent by: Subject: Re: [boost] Re: Fast Track Review Request: Disable unused variable
                      boost-bounces_at_lists.boos warnings.
                      11/12/2003 04:12 PM
                      Please respond to Boost
                      mailing list

[2003-11-12] Eric Friedman wrote:

>Rene Rivera wrote:
>> Dear Boosters,
>> Did the one change Dave suggested of using the function template
>> instead of the macro.. To avoid yet another BOOST macro...
>> template <class T> inline void no_unused_variable_warning(const T&) {}
>Why not just call it unused_variable?
>Argument: It seems the intent is to explicitly document that the
>variable is unused. The added benefit is that the compiler understands
>this documentation. If we were just trying to silence the compiler, we
>could turn off unused variable warnings.

The one reason I can think of to have the extra no_..._warning is to
document not just that the variable is unused, but that it causes a warning
because it is unused.

That said.. I'm happy with just about any name others think is best ;-)

-- grafik - Don't Assume Anything
-- rrivera (at) - grafik (at)
-- 102708583 (at) icq
Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at