diff options
Diffstat (limited to 'cutl/meta')
-rw-r--r-- | cutl/meta/answer.hxx | 24 | ||||
-rw-r--r-- | cutl/meta/class-p.hxx | 27 | ||||
-rw-r--r-- | cutl/meta/polymorphic-p.hxx | 52 | ||||
-rw-r--r-- | cutl/meta/remove-c.hxx | 26 | ||||
-rw-r--r-- | cutl/meta/remove-cv.hxx | 23 | ||||
-rw-r--r-- | cutl/meta/remove-p.hxx | 26 | ||||
-rw-r--r-- | cutl/meta/remove-v.hxx | 26 |
7 files changed, 0 insertions, 204 deletions
diff --git a/cutl/meta/answer.hxx b/cutl/meta/answer.hxx deleted file mode 100644 index dadec23..0000000 --- a/cutl/meta/answer.hxx +++ /dev/null @@ -1,24 +0,0 @@ -// file : cutl/meta/answer.hxx -// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC -// 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 c04fba5..0000000 --- a/cutl/meta/class-p.hxx +++ /dev/null @@ -1,27 +0,0 @@ -// file : cutl/meta/class-p.hxx -// copyright : Copyright (c) 2009-2019 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 - { - // 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 7acbbff..0000000 --- a/cutl/meta/polymorphic-p.hxx +++ /dev/null @@ -1,52 +0,0 @@ -// file : cutl/meta/polymorphic-p.hxx -// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC -// 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 68f7812..0000000 --- a/cutl/meta/remove-c.hxx +++ /dev/null @@ -1,26 +0,0 @@ -// file : cutl/meta/remove-c.hxx -// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC -// 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 51fbd21..0000000 --- a/cutl/meta/remove-cv.hxx +++ /dev/null @@ -1,23 +0,0 @@ -// file : cutl/meta/remove-cv.hxx -// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC -// 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 51cd89e..0000000 --- a/cutl/meta/remove-p.hxx +++ /dev/null @@ -1,26 +0,0 @@ -// file : cutl/meta/remove-p.hxx -// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC -// 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 06628a4..0000000 --- a/cutl/meta/remove-v.hxx +++ /dev/null @@ -1,26 +0,0 @@ -// file : cutl/meta/remove-v.hxx -// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC -// 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 |