Boost logo

Boost :

From: Paul A. Bristow (boost_at_[hidden])
Date: 2003-12-18 05:28:24


Would the attached help ?

template <class T> inline void no_unused_variable_warning(const T&) {}

(there was subsequent discussion about the name but general approval as a
'Boost's Good Way of Doing It')

Paul

Paul A Bristow, Prizet Farmhouse, Kendal, Cumbria, LA8 8AB UK
+44 1539 561830 Mobile +44 7714 33 02 04
mailto:pbristow_at_[hidden]

| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]]On Behalf Of Marc-Antoine Ruel
| Sent: Wednesday, December 17, 2003 8:20 PM
| To: Boost mailing list
| Subject: RE: [boost] Re: OnReturn
|
|
| I did search the archives with keywords resource and RIIA but not
| scope guard.. :)
|
| Finally I use an slightly modified version of Daniel Wallin's one,
| which is far better. The only draw back is that I now get a warning
| about an unused initialized variable which I don't know how to get
| rid of (without desactivating the warning).


attached mail follows:


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&) {}

Please take a look at the updated archive:

http://groups.yahoo.com/group/boost/files/disable_warning.zip

..and attached, as it's very small.

Enjoy.

-- grafik - Don't Assume Anything
-- rrivera (at) acm.org - grafik (at) redshift-software.com
-- 102708583 (at) icq




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