Boost logo

Boost Users :

From: JOAQUIN LOPEZ MU?Z (joaquin_at_[hidden])
Date: 2007-02-25 11:48:36


Hi Christoph,

----- Mensaje original -----
De: Christoph <christoph.duelli_at_[hidden]>
Fecha: Domingo, Febrero 25, 2007 4:48 pm
Asunto: [Boost-users] [multi index] warning when used in copy
constructor:should be explicitly initialized
Para: boost-users_at_[hidden]

> 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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net