[C++-sig] [patch] Unused variable warnings.

Nicolas Lelong nico_ml at mgdesign.org
Wed Apr 9 12:04:52 CEST 2003

> The patch just casts the unused variables to void , so it should be
> harmless.

Just my two cents, but it would maybe have been better if you had used the
'ignore_unused_variable_warning' function, which is defined in
'concept_check.hpp' - or maybe something similar already in use for
boost.python (anyone?)

Moreover, I may be wrong but, the common (standard?) way of preventing such
warnings is to remove the unused parameter name - so the, for instance, the

  inline void register_class_to_python(mpl::true_ copyable, SelectHolder
selector, T* = 0)

would become

  inline void register_class_to_python(mpl::true_ /*copyable*/, SelectHolder
/*selector*/, T* = 0)


More information about the Cplusplus-sig mailing list