Boost.Serialization warning C4540 on MSVC
Hi, 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). All help greatly appreciated, thanks in advance.
Antti Alho wrote:
Hi,
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
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).
I'm guessing that the problem is the word virtual here class Particle : virtual public Object ... I can imagine that this might make casting to a base class problematic in the case of diamond inheritance. Maybe some C++ guru want's to chime in. Robert Ramey
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
participants (3)
-
Antti Alho
-
Robert Ramey
-
Steven Watanabe