|
Boost Users : |
Subject: Re: [Boost-users] Boost.Serialization warning C4540 on MSVC
From: Robert Ramey (ramey_at_[hidden])
Date: 2010-02-18 01:07:27
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
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