Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-10-23 22:07:34

Rene Rivera <grafik.list_at_[hidden]> writes:

> I was in the process of looking at some of the build warnings some of which
> are unused variable warnings. On Dave's suggestion I looked around for how
> this is solved in other places, and here's what I found.
> The following is defined/used in many places, in a variety of forms:
> template <class T> inline void unused_variable(const T&) { }
> A few questions:
> 1. Is it better to have a common definition, used by all, for this?


> 2. If so, is Boost.Utility the place for it? Or is there a better place?

Sounds right.

> 3. I'll gladly add ASAP, in which case; Is "unused_variable" a reasonable
> name?

Reasonable, though "no_unused_warning" might be more self-documenting.

> And does something like this, in such widespread use, have to go
> through a review?

Not if it's in detail. If you want to document it and make it public
(which I prefer for this function), it should go through fast track

Dave Abrahams
Boost Consulting

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