From 6f70eeec9401f385c8122445eedb53602a002830 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 25 Mar 2011 16:50:19 +0200 Subject: Add support for forward-declaring shared_base-based types The forward declaration must specialize the counter_type template to explicitly specify shared_base as the counter type. --- odb/details/shared-ptr/counter-type.hxx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 odb/details/shared-ptr/counter-type.hxx (limited to 'odb/details/shared-ptr/counter-type.hxx') diff --git a/odb/details/shared-ptr/counter-type.hxx b/odb/details/shared-ptr/counter-type.hxx new file mode 100644 index 0000000..f208a4f --- /dev/null +++ b/odb/details/shared-ptr/counter-type.hxx @@ -0,0 +1,25 @@ +// file : odb/details/shared-ptr/counter-type.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ODB_DETAILS_SHARED_PTR_COUNTER_TYPE_HXX +#define ODB_DETAILS_SHARED_PTR_COUNTER_TYPE_HXX + +#include + +namespace odb +{ + namespace details + { + template + struct counter_type + { + typedef X counter; + }; + } +} + +#include + +#endif // ODB_DETAILS_SHARED_PTR_COUNTER_TYPE_HXX -- cgit v1.1