Boost logo

Boost :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2006-03-17 02:55:28


Alexei Alexandrov ha escrito:

> I compile my program which uses Boost.multi_index and get some obscure
> warnings. It would be great if the library maintainer could disable them in the
> source code - it is really annoying and I would like to bracker my #include
> <boost/...> with #pragma-s.
>
> The warnings are:
>
> boost\multi_index\detail\hash_index_node.hpp(89) : warning C4610:
> struct 'boost::multi_index::detail::hashed_index_node_trampoline<Super>' can
> never be instantiated - user defined constructor required
>
> boost\multi_index\composite_key.hpp(570) : warning
> C4512: 'boost::multi_index::composite_key_result<CompositeKey>' : assignment
> operator could not be generated
>
> boost\multi_index\detail\bucket_array.hpp(152) : warning
> C4512: 'boost::multi_index::detail::bucket_array<Allocator>' : assignment
> operator could not be generated
>
> The line numbers are against 1.33.1 release.

Hello Alexei,

I could avoid these warnings in Boost.MultiIndex, but I'm not sure this
is the right thing to do, as the problem is really Boost-wide and should
be considered, IMHO, from a global point of view: any class using
boost::noncopyable will make MSVC level 4 shout, try the following
for instance:

#include <boost/noncopyable.hpp>

class foo:boost::noncopyable
{
};

In my opinion, these warnings can hardly uncover any real programming
error (which is what the warnings are meant for in the first place), so
it would be perfectly safe to just pragma them away globally in your
project.

> P.S. Kudos to the author of multi_index - it's really great thing. Your mother
> must be very proud of you...

She is, though she doesn't care much about C++ :)
Thanks for your compliments, best regards,

Joaquín M López Muñoz
Telefónica, Inevstigación y Desarrollo


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk