|
Boost : |
From: Johan Nilsson (johan.nilsson_at_[hidden])
Date: 2004-07-30 02:27:57
[Should this really go to boost.users instead?]
Hi,
loads of warnings are generated when compiling code with VC 7.1 using
Boost.Thread and lexical_cast with the warning level set to 4. I use Boost
1.31.0, but at a quick look at the latest versions they seem to have the
same problem
* Boost.Thread generates numerous C4275 and C4251 (both related to
dll-interface),
examples:
--- ../../../deps\boost\boost\thread\exceptions.hpp(29) : warning C4275: non dll-interface class 'std::logic_error' used as base for dll-interface class 'boost::lock_error' d:\VS.NET_2003\Vc7\include\stdexcept(14) : see declaration of 'std::logic_error' ../../../deps\boost\boost\thread\thread.hpp(78) : warning C4251: 'boost::thread_group::m_threads' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'boost::thread_group' --- * lexical_cast generates C4511, C4512 + C4127, examples: -- ../../../deps\boost\boost\lexical_cast.hpp(180) : warning C4512: 'boost::detail::lexical_stream<Target,Source>' : assignment operator could not be generated ... ../../../deps\boost\boost\lexical_cast.hpp(180) : warning C4511: 'boost::detail::lexical_stream<Target,Source>' : copy constructor could not be generated ... ../../../deps\boost\boost\lexical_cast.hpp(133) : warning C4127: conditional expression is constant --- Would it be possible to get rid of those using pragmas in the header files? I wouldn't mind disabling C4511/4512 globally but the other ones I'd prefer not to. Selectively disabling the other warnings when including the files is practically impossible. I guess this has been discussed before, but why not compile with warning level 4 + warnings as errors by default? // Johan
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk