diff options
Diffstat (limited to 'odb/details/shared-ptr')
-rw-r--r-- | odb/details/shared-ptr/base.hxx | 5 | ||||
-rw-r--r-- | odb/details/shared-ptr/base.txx | 2 | ||||
-rw-r--r-- | odb/details/shared-ptr/counter-type.hxx | 25 |
3 files changed, 29 insertions, 3 deletions
diff --git a/odb/details/shared-ptr/base.hxx b/odb/details/shared-ptr/base.hxx index 7cf44da..3bc2df1 100644 --- a/odb/details/shared-ptr/base.hxx +++ b/odb/details/shared-ptr/base.hxx @@ -12,8 +12,8 @@ #include <cstddef> // std::size_t #include <odb/exception.hxx> - #include <odb/details/export.hxx> +#include <odb/details/shared-ptr/counter-type.hxx> namespace odb { @@ -52,8 +52,9 @@ namespace odb what () const throw (); }; - struct LIBODB_EXPORT shared_base + class LIBODB_EXPORT shared_base { + public: shared_base (); shared_base (const shared_base&); shared_base& diff --git a/odb/details/shared-ptr/base.txx b/odb/details/shared-ptr/base.txx index a836974..a57ce91 100644 --- a/odb/details/shared-ptr/base.txx +++ b/odb/details/shared-ptr/base.txx @@ -68,7 +68,7 @@ namespace odb template <typename X> struct counter_type<X, sizeof (meta::no)> { - typedef X r; + typedef typename details::counter_type<X>::counter r; }; template <typename X> 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 <boris@codesynthesis.com> +// 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 <odb/pre.hxx> + +namespace odb +{ + namespace details + { + template <typename X> + struct counter_type + { + typedef X counter; + }; + } +} + +#include <odb/post.hxx> + +#endif // ODB_DETAILS_SHARED_PTR_COUNTER_TYPE_HXX |