Hi,
The ignore_unused_variable_warning() tool is used in many libraries. Its
"main" definition (probably the first one) is in concept_check.hpp in
the namespace boost but functions of the same name and purpose are also
defined in the internals of some libraries (GIL, Interval, Test, uBlas,
Unordered), probably to not include the whole concept_check.hpp.
So I propose to move this useful tool out of the concept_check.hpp to
somewhere else. Since it was already defined in the namespace boost, not
boost::detail, the right place would probably be:
boost/utility/ignore.hpp
or
boost/utility/ignore_warning.hpp
Furthermore I propose to add a few overloads becasue it's common that
the compiler warns about a few variables in the same function, so
instead of using N calls:
boost::ignore_unused_variable_warning(x)
boost::ignore_unused_variable_warning(y)
boost::ignore_unused_variable_warning(z)
we could use only one:
boost::ignore_unused_variable_warning(x, y, z)
which would be more convenient to use and read.
If you were ok with the change, I'd be glad to hear some tips how to
make it in one commit, i.e. to modify two modules at once - modify a
file in ConceptCheck and add a file to Utility?
And finally I'm considering adding similar tool for unused typedefs
because some compilers (GCC4.8) warns about them and there are cases,
e.g. when some part of code is shielded with some #ifdef, where they
can't be commented out or removed. E.g. something like this would work,
though I'm not sure if there is no better way, so I'm open to suggestion.
struct empty_type {};
template