
Hi Christoph,
----- Mensaje original -----
De: Christoph
Using gcc with option -W I get the following warning when using a Boost.MultiIndex container inside a copy constructor: [...] warning: base class 'struct boost::multi_index::detail::header_holder<...>' should be explicitly initialized in the copy constructor [...] I would assume that copying a multi index is not forbidden and using
Certainly, copying multi_index_containers is allowed.
Is there a way to get rid of that warning? I am trying hard to produce warning free code, and in this case I am not sure if the warning is just ugly or if it is a real problem in the code.
The warning looks spurious to me, the mentioned class is default constructed in the context where the warning is issued, which is the intended behavior. I don't get why GCC requires explicit initialization. I see you're using Boost 1.33.1. Can you try the following? Please download a RC_1_34_0 snapshot from http://engineering.meta-comm.com/boost/snapshot/boost-CVS- RC_1_34_0.tar.bz2 and check whether the warning persists. If so, I can try to eliminate it. Thank you, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo