Hi all,
I have just disabled the compilation warning #4224 for VC2005 by adding the corresponding preprocessor command in ql/config.msvc.hpp. I’m wondering if disabling uncommon compilation warning at a more local level would‘nt be more appropriated. Indeed changing a line in ql/config.msvc.hpp trigger the whole recompilation of QL, and increase the size of a file which will be read hundred of times. For example the compilation warning #4180 which appears only during matrix.cpp compilation could be disabled the following way:
#if defined (BOOST_MSVC)
#pragma warning (disable: 4180)
#endif
#include <boost/numeric/ublas/triangular.hpp>
#include <boost/numeric/ublas/lu.hpp>
#if defined (BOOST_MSVC)
#pragma warning (default: 4180)
#endif
Since the compilation warning #4224 appear every time boost/function.hpp is included (9 times in QL) we might define some handy macros somewhere:
#define QL_SAFE_BOOST_FUNCTION_INCLUDE \
#if defined (BOOST_MSVC) \
#pragma warning (disable: 4224) \
#endif \
#include <boost/function.hpp> \
#if defined (BOOST_MSVC) \
#pragma warning (default: 4224) \
#endif \
any thoughts ?
François
Free forum by Nabble | Disable Popup Ads | Edit this page |