[C++-sig] pickle support patches checked in

David Abrahams david.abrahams at rcn.com
Mon Jul 22 20:19:07 CEST 2002


From: "Ralf W. Grosse-Kunstleve" <rwgk at yahoo.com>


> --- David Abrahams <david.abrahams at rcn.com> wrote:
> > However, it would be nice if you'd enforce that they used your base
class
> > by attempting to convert to a pickle_fucntions*.
>
> This additional check seemed highly redundant to me. Yes, if someone
correctly
> supplies all four static functions in the pickle group it will work
without the
> derivation, but then the compile-time check is not needed. If any
signature is
> wrong or any of the four functions is missing there will be a
"controlled"
> compile-time error anyway.

I see.

> Hm, maybe it would be nice to generate a different compile-time error
> "must_inherit_from_pickle_group" just to give a better clue. Could this
be
> done?

Just pass a pointer to the group to a function accepting pickle_group const
volatile*

-D






More information about the Cplusplus-sig mailing list