Boost logo

Boost Users :

From: Pablo Aguilar (pablo.aguilar_at_[hidden])
Date: 2005-02-26 05:14:58


Comments below

Robert Ramey wrote:
> Pablo Aguilar wrote:
>
>>Hi,
>>
>>I've just started using the serialization library, and am trying to do
>>so with BC++6.
>>
>>If I'm right, it should work just as long as I remove support for xml
>>archives (because Spirit doesn't work on BC++)
>
>
> A better alternative is to install spirit 1.6x on your machine. That way
> you get xml archives and you have everything the same as other boost users.

Ok, thanks, but since I'm not using it for the time being, I might as
well leave it out. Besides, I'm more focused right now on getting it to
work in the first place.

>>I've a class Cliente which has an appropriate serialize member fxn.
>>And a manager class called Clientes which stores a
>>
>>std::vector<boost::shared_ptr<Cliente> >
>>
>>When doing:
>
>
> I presume you included the template statement
>
> template<class Archive>

I did.

>>void Clientes::serialize(Archive& ar, unsigned const version)
>>{
>> ar & m_imp->m_clientes;
>>
>> // where m_imp is a pimpl-style struct
>> // m_clientes is of the type specified above
>>}
>>
>>(this is trimmed down code, I can post the original if required)
>>
>>I get the following error:
>> [C++ Error] serialization.hpp(121): E2015 Ambiguity between
>> 'boost::serialization::void serialize<
>> boost::archive::text_iarchive
>> , boost::shared_ptr<cc::servidor::Cliente>
>> > (
>> boost::archive::text_iarchive &
>> , _STL::vector<boost::shared_ptr<cc::servidor::Cliente> > &
>> , const unsigned int
>> )'
>>
>> and
>>
>> 'boost::serialization::void serialize<
>> boost::archive::text_iarchive
>> , _STL::vector<boost::shared_ptr<cc::servidor::Cliente> >
>> >(
>> boost::archive::text_iarchive &
>> , _STL::vector<boost::shared_ptr<cc::servidor::Cliente> > &
>> , const unsigned int
>> )'
>>
>>(I removed the allocator parts to make the message clearer)
>>
>>So the question is, how do I remove the ambiguity?
>>
>
>
> are you including the header boost/serialization/shared_ptr.hpp instead of
> boost/shared_ptr.hpp ?

I was including boost/shared_ptr.hpp
Changed that now, and I'm still getting the same error. I'll take
another shot at this tomorrow (I'm not thinking clearly anymore, it's
2:00am!)

>>Thanks for your help...
>>
>>Pablo Aguilar
>
>
> Truth is - i havn't seen this before - its hard to make a judgement without
> seeing the whole program.
>
> Ass

??
I suppose you were going to write something more, right? Or is that what
  I get for not reading the docs properly ;-) ?

Pablo


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