Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Serialization warning C4540 on MSVC
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-02-25 21:34:06


AMDG

Antti Alho wrote:
> I'm using Boost.Serialization for my project and have run into a
> cryptic warning message. Although it doesn't seem to actually do any
> harm on run-time I would like to know what it means, and possibly how
> I can fix it without #pragma disabling it.
>
> The relevant code and the entire warning can be found here:
> Codepad paste <http://codepad.org/MVx2O6dC>
>
> The error message was produced by Visual Studio 2008.
>
> Since I'm not perfectly sure what the correct syntax is supposed to be
> regarding lines 74 and 75 when dealing with classes using multiple
> inheritance and since I couldn't find documentation regarding the
> subject those could very well be the source of my problems (although
> it seems to do what it is expected to do).

The problem is that you need to say
class DynamicParticle : public Effector, public Particle {
instead of
class DynamicParticle : public Effector, Particle {

In Christ,
Steven Watanabe


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