Hi fellows,
I'm using gcc 4.2.1 on OSX 10.7.4 and I've recently updated from boost 1.47 to 1.49.0.
My project uses ptr_multimaps. My project is configured to use the gcc flags -Werror -Wall -Wextra because I like to be alerted early if something can go wrong. Using -Werror is kind of a self-imposed restriction to keep my code clean of dirty hacks. I've been used to compile my code this way since about boost 1.44.
With the update to 1.49 however, building with -Werror -Wextra is no longer possible, because I'm getting the following warning:
/usr/local/boost/include/boost/ptr_container/ptr_map_adapter.hpp: In copy constructor 'boost::ptr_multimap_adapter::ptr_multimap_adapter(const boost::ptr_multimap_adapter&) [with T = Foo, VoidPtrMultiMap = std::multimap, void*, std::less >, std::allocator, void*> > >, CloneAllocator = boost::heap_clone_allocator, bool Ordered = true]':
/usr/local/boost/include/boost/ptr_container/ptr_map.hpp:89: instantiated from here
/usr/local/boost/include/boost/ptr_container/ptr_map_adapter.hpp:727: warning: base class 'class boost::ptr_container_detail::ptr_map_adapter_base, void*, std::less >, std::allocator, void*> > >, boost::heap_clone_allocator, true>' should be explicitly initialized in the copy constructor
The only possibility to compile this is to remove -Wextra, because gcc has no separate warning option to turn off the copy constructor check (see [1]), so I lose not only this check, but also everything else enabled by -Wextra, which I'd be very unhappy with.
For the time being, I just removed -Werror, but this totally clutters up my build output now, which usually allows me to spot every problem really quick, because it is so brief.
Since this is a regression (it worked until the 1.49.0 update), I'd be happy if someone can check how this was introduced in 1.49.0 and open a ticket for the incriminating change.
Regards,
Philipp
[1] http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html