Boost logo

Boost :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2003-10-31 00:33:13

Dear Boosters,

This little utility tries to solve the old problem of compiler warnings
about unused variables in the least impact way possible.

The solution I ended up implementing is different, hopefully better, than
the rest of solutions I saw currently in use in Boost:

    * (void)variable;
      // Does not working on all compilers.
    * template<class T> inline void unused(const T &) {}
      // Additional overhead of templates.

This implementation is a combination of macro and function:

namespace boost { namespace detail {
    inline void no_unused_variable_warning(void*) { }
} }


It has the benefits of clearly marking the intention, no template overheads,
and works on all compilers.

Please take a look at the archive for the files, documentation and test
included, at:

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


-- grafik - Don't Assume Anything
-- rrivera (at) - grafik (at)
-- 102708583 (at) icq

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