Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-06-27 10:00:47


Vladimir Prus wrote:
>
> Does serialization library (exception for *SPLIT* macros), ever
> calls 'load' function that is provided by the user.
>
> Your explanation above only reiterates what I've said: the
> serialization library only calls the "serialize" function. That
> function might delegate
> its work to the 'load' function, but it happens inside user code, not
> inside serialization code. That's why I think you should prevent ADL
> when calling 'load' in the mentioned place.

To be honest, I would have to go back and review a little to give you a
definitive answer. But the only member function called by the library is
"serialize". I think the issue comes up regarding the usage of the free
function template "serialize". If one uses "split_free" then there one
needs load and save functions and the question arises as to which namespaces
they should be in. I prefered putting them boost::serialization:: . If I
remember correctly, I then had a problem with compilers that use two-phase
lookup and I hade to permit ADL so that the templates would be checked again
at instantiation time. I'm speaking from memory so this explanatino might
not be exactly accurate. If you look at the the included serializations in
version 1.32 vs 1.33 and the old manual vs the new manual there were some
baroque rules as to which namespaces spercializations could be put into
depending upon whether or not the compiler being used implemented two-phase
lookup. The latest version was able to do away with all that.

So that's my explanation.

Robert Ramey


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk