diff options
Diffstat (limited to 'cutl/meta')
-rw-r--r-- | cutl/meta/answer.hxx | 23 | ||||
-rw-r--r-- | cutl/meta/class-p.hxx | 26 | ||||
-rw-r--r-- | cutl/meta/polymorphic-p.hxx | 51 | ||||
-rw-r--r-- | cutl/meta/remove-c.hxx | 25 | ||||
-rw-r--r-- | cutl/meta/remove-cv.hxx | 22 | ||||
-rw-r--r-- | cutl/meta/remove-p.hxx | 25 | ||||
-rw-r--r-- | cutl/meta/remove-v.hxx | 25 |
7 files changed, 0 insertions, 197 deletions
diff --git a/cutl/meta/answer.hxx b/cutl/meta/answer.hxx deleted file mode 100644 index c1fec6e..0000000 --- a/cutl/meta/answer.hxx +++ /dev/null @@ -1,23 +0,0 @@ -// file : cutl/meta/answer.hxx -// license : MIT; see accompanying LICENSE file - -#ifndef CUTL_META_ANSWER_HXX -#define CUTL_META_ANSWER_HXX - -namespace cutl -{ - namespace meta - { - struct yes - { - char filling; - }; - - struct no - { - char filling[2]; - }; - } -} - -#endif // CUTL_META_ANSWER_HXX diff --git a/cutl/meta/class-p.hxx b/cutl/meta/class-p.hxx deleted file mode 100644 index 7221c3e..0000000 --- a/cutl/meta/class-p.hxx +++ /dev/null @@ -1,26 +0,0 @@ -// file : cutl/meta/class-p.hxx -// 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 - { - // 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 // CUTL_META_CLASS_HXX diff --git a/cutl/meta/polymorphic-p.hxx b/cutl/meta/polymorphic-p.hxx deleted file mode 100644 index da1a3f9..0000000 --- a/cutl/meta/polymorphic-p.hxx +++ /dev/null @@ -1,51 +0,0 @@ -// file : cutl/meta/polymorphic-p.hxx -// license : MIT; see accompanying LICENSE file - -#ifndef CUTL_META_POLYMORPHIC_HXX -#define CUTL_META_POLYMORPHIC_HXX - -#include <cutl/details/config.hxx> - -#include <cutl/meta/class-p.hxx> -#include <cutl/meta/remove-cv.hxx> - -namespace cutl -{ - namespace meta - { - template <typename CVX> - struct polymorphic_p - { - typedef typename remove_cv<CVX>::r X; - - template <typename Y, bool C> - struct impl - { - static const bool r = false; - }; - - template <typename Y> - struct impl<Y, true> - { - struct t1: Y - { - t1 (); - }; - - struct t2: Y - { - t2 (); - - virtual - ~t2 () LIBCUTL_NOTHROW_NOEXCEPT; - }; - - static const bool r = sizeof (t1) == sizeof (t2); - }; - - static const bool r = impl<X, class_p<X>::r>::r; - }; - } -} - -#endif // CUTL_META_POLYMORPHIC_HXX diff --git a/cutl/meta/remove-c.hxx b/cutl/meta/remove-c.hxx deleted file mode 100644 index e83673b..0000000 --- a/cutl/meta/remove-c.hxx +++ /dev/null @@ -1,25 +0,0 @@ -// file : cutl/meta/remove-c.hxx -// license : MIT; see accompanying LICENSE file - -#ifndef CUTL_META_REMOVE_C_HXX -#define CUTL_META_REMOVE_C_HXX - -namespace cutl -{ - namespace meta - { - template <typename X> - struct remove_c - { - typedef X r; - }; - - template <typename X> - struct remove_c<X const> - { - typedef X r; - }; - } -} - -#endif // CUTL_META_REMOVE_C_HXX diff --git a/cutl/meta/remove-cv.hxx b/cutl/meta/remove-cv.hxx deleted file mode 100644 index b872a41..0000000 --- a/cutl/meta/remove-cv.hxx +++ /dev/null @@ -1,22 +0,0 @@ -// file : cutl/meta/remove-cv.hxx -// license : MIT; see accompanying LICENSE file - -#ifndef CUTL_META_REMOVE_CV_HXX -#define CUTL_META_REMOVE_CV_HXX - -#include <cutl/meta/remove-c.hxx> -#include <cutl/meta/remove-v.hxx> - -namespace cutl -{ - namespace meta - { - template <typename X> - struct remove_cv - { - typedef typename remove_v<typename remove_c<X>::r>::r r; - }; - } -} - -#endif // CUTL_META_REMOVE_CV_HXX diff --git a/cutl/meta/remove-p.hxx b/cutl/meta/remove-p.hxx deleted file mode 100644 index e6530d3..0000000 --- a/cutl/meta/remove-p.hxx +++ /dev/null @@ -1,25 +0,0 @@ -// file : cutl/meta/remove-p.hxx -// license : MIT; see accompanying LICENSE file - -#ifndef CUTL_META_REMOVE_P_HXX -#define CUTL_META_REMOVE_P_HXX - -namespace cutl -{ - namespace meta - { - template <typename X> - struct remove_p - { - typedef X r; - }; - - template <typename X> - struct remove_p<X*> - { - typedef X r; - }; - } -} - -#endif // CUTL_META_REMOVE_P_HXX diff --git a/cutl/meta/remove-v.hxx b/cutl/meta/remove-v.hxx deleted file mode 100644 index e810294..0000000 --- a/cutl/meta/remove-v.hxx +++ /dev/null @@ -1,25 +0,0 @@ -// file : cutl/meta/remove-v.hxx -// license : MIT; see accompanying LICENSE file - -#ifndef CUTL_META_REMOVE_V_HXX -#define CUTL_META_REMOVE_V_HXX - -namespace cutl -{ - namespace meta - { - template <typename X> - struct remove_v - { - typedef X r; - }; - - template <typename X> - struct remove_v<X volatile> - { - typedef X r; - }; - } -} - -#endif // CUTL_META_REMOVE_V_HXX |