Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-09-25 19:30:17


At 10:06 AM 9/25/2001, williamkempf_at_[hidden] wrote:

>> typedef void ignore_unused_variable;
>>
>> ;-)
>
>Effectively no different then the proposed definition. I don't care
>how it's implemented, I'm asking if we want the functionality added
>to config or some other header for general use by Boost developers.

Not boost/config.hpp. This isn't a configuration tool. More likely
boost/utility.hpp.

But jump back a bit. I missed something. What is wrong with the
traditional style of coding for unused parameters, and variables?

void foo ( MyClass const& /*c*/ )
{
    // int a ;
    // float b ;
}

Is the issue that a and b are in fact use in some control paths, and so
can't just be commented out (or outright removed), yet the compiler is
warning because they aren't used in all control paths?

--Beman


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