Boost logo

Boost :

Subject: [boost] [variant] unreferenced formal parameter warning from VC9
From: Richard Webb (richard.webb_at_[hidden])
Date: 2008-10-05 09:20:25


(i think i might have mentioned this before, but it still happens with the
current code, so...)

Using Variant on VC9 with warning level 4 can result in an unreferenced
parameter warning:

boost/variant/variant.hpp(289) : warning C4100: 'operand' : unreferenced
formal parameter

This can be silenced by extending the existing Borland workaround to apply
to VC as well. For example, change the existing:

#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0551))
        operand; // suppresses warnings

to

#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0551)) ||
BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
        operand; // suppresses warnings

Thanks,
Richard Webb

-- 
View this message in context: http://www.nabble.com/-variant--unreferenced-formal-parameter-warning-from-VC9-tp19824530p19824530.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

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