2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-23 05:42:30 +00:00

additional compile-time check: must_be_derived_from_pickle_suite

[SVN r14568]
This commit is contained in:
Ralf W. Grosse-Kunstleve
2002-07-22 23:43:00 +00:00
parent bfe2a6656c
commit e25fee71a2
2 changed files with 4 additions and 0 deletions

View File

@@ -200,6 +200,7 @@ class class_ : public objects::class_base
template <typename PickleSuiteType>
self& def_pickle(PickleSuiteType)
{
error_messages::must_be_derived_from_pickle_suite(PickleSuiteType());
detail::pickle_suite_finalize<PickleSuiteType>::register_(
*this,
&PickleSuiteType::getinitargs,

View File

@@ -13,11 +13,14 @@ namespace boost { namespace python {
handle<> make_instance_reduce_function();
struct pickle_suite;
namespace error_messages {
template <class T>
struct missing_pickle_suite_function_or_incorrect_signature {};
inline void must_be_derived_from_pickle_suite(pickle_suite const&) {}
}
namespace detail { struct pickle_suite_registration; }