diff options
Diffstat (limited to 'cutl/meta/class-p.hxx')
-rw-r--r-- | cutl/meta/class-p.hxx | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/cutl/meta/class-p.hxx b/cutl/meta/class-p.hxx new file mode 100644 index 0000000..79e8469 --- /dev/null +++ b/cutl/meta/class-p.hxx @@ -0,0 +1,27 @@ +// file : cutl/meta/class-p.hxx +// author : Boris Kolpackov <boris@codesynthesis.com> +// copyright : Copyright (c) 2009 Code Synthesis Tools CC +// license : MIT; see accompanying LICENSE file + +#ifndef CUTL_META_CLASS_HXX +#define CUTL_META_CLASS_HXX + +#include <cutl/meta/answer.hxx> + +namespace cutl +{ + namespace meta + { + template <typename X> + struct class_p + { + template <typename Y> static no test (...); + template <typename Y> static yes test (void* Y::*); + + static bool const r = sizeof ( + class_p<X>::template test<X> (0)) == sizeof (yes); + }; + } +} + +#endif // CUTL_META_CLASS_HXX |