diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-08-18 20:02:11 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-08-18 20:02:11 +0200 |
commit | 2636e266dc7a048e52b40b668c460c2793e897c4 (patch) | |
tree | 9717f573d9733b8cfa09a15ee44ed7768c427d7b /odb/details/meta/class-p.hxx | |
parent | dce5d0658e67ced4d5fa64f98f598b86917927a7 (diff) |
Move shared_ptr to the details namespace
Diffstat (limited to 'odb/details/meta/class-p.hxx')
-rw-r--r-- | odb/details/meta/class-p.hxx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/odb/details/meta/class-p.hxx b/odb/details/meta/class-p.hxx new file mode 100644 index 0000000..c680d8e --- /dev/null +++ b/odb/details/meta/class-p.hxx @@ -0,0 +1,31 @@ +// file : odb/details/meta/class-p.hxx +// author : Boris Kolpackov <boris@codesynthesis.com> +// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ODB_DETAILS_META_CLASS_HXX +#define ODB_DETAILS_META_CLASS_HXX + +#include <odb/details/meta/answer.hxx> + +namespace odb +{ + namespace details + { + namespace meta + { + // g++ cannot have these inside class_p. + // + template <typename Y> no class_p_test (...); + template <typename Y> yes class_p_test (void (Y::*) ()); + + template <typename X> + struct class_p + { + static bool const r = sizeof (class_p_test<X> (0)) == sizeof (yes); + }; + } + } +} + +#endif // ODB_DETAILS_META_CLASS_HXX |