Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-06-27 00:42:20


Robert Ramey wrote:

> David Abrahams wrote:
>> Use of ADL should be limited to places you intend the library's
>> behavior to be customized ("customization points") in part to avoid
>> the problem cited below: picking up names used in the library but
>> never intended to interact with it. Volodya's question is whether
>> load was really intended to be a customization point.
>>
>
> The main customization point is to specialize the template
>
> template<class Archive, class T>
> void seriailize(Archive &ar, T &t, const unsigned int version)
>
> There is common specialization summarized by
> BOOST_SERIALIZATION_SPLIT_FREE(T) which implemetns
> void serialize(...
> // if its an output archive
> save(...
> // compile time else
> load(...
>
> So save and load can be customization points as well. I think this is
> pretty well explained in the manual.

The question is different:

  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.

- Volodya


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