Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost.Serialization] Serializing "abstract"classes
From: Júlio Hoffimann (julio.hoffimann_at_[hidden])
Date: 2011-08-05 15:41:39


Yes, but why?

../libs/boost/include/boost/serialization/export.hpp:134:40: warning: type
qualifiers ignored on function return type
main.cpp:83:5: warning: unused parameter ‘argc’
main.cpp:83:5: warning: unused parameter ‘argv’

Can you reproduce the error in your Boost version?

2011/8/5 Robert Ramey <ramey_at_[hidden]>

> Júlio Hoffimann wrote:
> > Just correcting another mistake mine, the warning is not on line 40
> > as i said. It's in export.hpp 134:40.
> >
>
> That's where it's detected. It's caused somehere else - see below.
>
> >
> > Do you have any hint Robert? What could i do to fix this? I heard
> > Boost.Serialization changed dramatically from 1.45 to actual
> > versions. I just don't want to upgrade right now because i'm the
> > middle of another job.
> >
>
> One obvious problem is that the base class is not abstract. To be
> abstract,
> a base class must have atleast one virtual function in the form
>
> virtual my_function() = 0;
>
> The ASSUME_ABSTRACT macro doesn't mark it abstract to the
> compiler - it marks it abstract to the boost type-traites system.
> I know it's quirky and unclear - but I see no way to make it bullet proof.
>
> I'm sort of surprised/disappointed that this doesn't give a compile time
> warning. What compiler do you use?
>
> Robert Ramey
>
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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