
Andreas Huber wrote:
Steven Watanabe <watanabesj <at> gmail.com> writes:
./boost/statechart/detail/rtti_policy.hpp ./boost/statechart/detail/state_base.hpp ./boost/statechart/state_machine.hpp
All disabled warnings carry the following comment:
// We permanently turn off the following level 4 warnings because users will // have to do so themselves anyway if we turn them back on
The warnings in question are:
# pragma warning( disable: 4511 ) // copy constructor could not be generated # pragma warning( disable: 4512 ) // assignment op could not be generated
IMO, these warnings are not very useful. Users will get heaps of them when they employ the library, so disabling them permanently is a good thing.
Thats what I thought until recently I noticed that I had 4 similar functor classes and I was getting this warning in only 1 of them. Turns out I forgotten to make some member pointers const (I only made the pointed to data const). Fixing this actually ended up generating better code on another compiler (the one for the shipping platform) in a performance critical area. I don't think libraries should force such decisions on end users. If you have evaluated your code and made sure it is doing the right thing than disable the push the warning disable but restore it so that users might catch problems in their code. Anything else is rude. Thanks, Michael Marcin