diff options
author | Jörg Frings-Fürst <jff@merkur> | 2014-05-18 16:08:14 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <jff@merkur> | 2014-05-18 16:08:14 +0200 |
commit | a15cf65c44d5c224169c32ef5495b68c758134b7 (patch) | |
tree | 3419f58fc8e1b315ba8171910ee044c5d467c162 /libcult/cult/meta/class-p.hxx |
Imported Upstream version 3.3.0.2upstream/3.3.0.2
Diffstat (limited to 'libcult/cult/meta/class-p.hxx')
-rw-r--r-- | libcult/cult/meta/class-p.hxx | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/libcult/cult/meta/class-p.hxx b/libcult/cult/meta/class-p.hxx new file mode 100644 index 0000000..6ac056d --- /dev/null +++ b/libcult/cult/meta/class-p.hxx @@ -0,0 +1,33 @@ +// file : cult/meta/class-p.hxx +// author : Boris Kolpackov <boris@kolpackov.net> +// copyright : Copyright (c) 2005-2010 Boris Kolpackov +// license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +#ifndef CULT_META_CLASS_HXX +#define CULT_META_CLASS_HXX + +#include <cult/types/fundamental.hxx> + +#include <cult/meta/answer.hxx> + +namespace Cult +{ + namespace Meta + { + template <typename X> + class class_p + { + //@@ g++ bug 14881 + public: + template <typename Y> static No test (...); + template <typename Y> static Yes test (Void* Y::*); + + public: + //@@ Qualification bug fixed for g++ 3.4.0. + static Boolean const r = + sizeof (class_p<X>::template test<X> (0)) == sizeof (Yes); + }; + } +} + +#endif // CULT_META_CLASS_HXX |