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
name.
For example: quell_warning_unused_variable(froggie);

                                                                                                                                              
                      Rene Rivera
                      <grafik.list_at_redshift-so To: Boost mailing list <boost_at_[hidden]>
                      ftware.com> cc:
                      Sent by: Subject: Re: [boost] Re: Fast Track Review Request: Disable unused variable
                      boost-bounces_at_lists.boos warnings.
                      t.org
                                                                                                                                              
                                                                                                                                              
                      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
solution
>> 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) acm.org - grafik (at) redshift-software.com
-- 102708583 (at) icq
_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk