From 6f0d40508286afc8cdd72a0b5f807d5c2a589cfc Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 4 Jun 2010 16:33:08 +0200 Subject: Initial implementation --- odb/meta/class-p.hxx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 odb/meta/class-p.hxx (limited to 'odb/meta/class-p.hxx') diff --git a/odb/meta/class-p.hxx b/odb/meta/class-p.hxx new file mode 100644 index 0000000..e3d15c9 --- /dev/null +++ b/odb/meta/class-p.hxx @@ -0,0 +1,28 @@ +// file : odb/meta/class-p.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ODB_META_CLASS_HXX +#define ODB_META_CLASS_HXX + +#include + +namespace odb +{ + namespace meta + { + // g++ cannot have these inside class_p. + // + template no class_p_test (...); + template yes class_p_test (void (Y::*) ()); + + template + struct class_p + { + static bool const r = sizeof (class_p_test (0)) == sizeof (yes); + }; + } +} + +#endif // ODB_META_CLASS_HXX -- cgit v1.1