From 713b3a62d97c6bea7c23597094af6b2439314b8c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 5 Sep 2011 10:11:28 +0200 Subject: Use more descriptive names in details/meta/ --- odb/details/meta/class-p.hxx | 7 +++--- odb/details/meta/polymorphic-p.hxx | 10 ++++----- odb/details/meta/remove-c.hxx | 34 ------------------------------ odb/details/meta/remove-const-volatile.hxx | 33 +++++++++++++++++++++++++++++ odb/details/meta/remove-const.hxx | 34 ++++++++++++++++++++++++++++++ odb/details/meta/remove-cv.hxx | 31 --------------------------- odb/details/meta/remove-p.hxx | 34 ------------------------------ odb/details/meta/remove-pointer.hxx | 34 ++++++++++++++++++++++++++++++ odb/details/meta/remove-v.hxx | 34 ------------------------------ odb/details/meta/remove-volatile.hxx | 34 ++++++++++++++++++++++++++++++ odb/details/shared-ptr/base.txx | 2 +- 11 files changed, 145 insertions(+), 142 deletions(-) delete mode 100644 odb/details/meta/remove-c.hxx create mode 100644 odb/details/meta/remove-const-volatile.hxx create mode 100644 odb/details/meta/remove-const.hxx delete mode 100644 odb/details/meta/remove-cv.hxx delete mode 100644 odb/details/meta/remove-p.hxx create mode 100644 odb/details/meta/remove-pointer.hxx delete mode 100644 odb/details/meta/remove-v.hxx create mode 100644 odb/details/meta/remove-volatile.hxx diff --git a/odb/details/meta/class-p.hxx b/odb/details/meta/class-p.hxx index fd28b1c..80c1b27 100644 --- a/odb/details/meta/class-p.hxx +++ b/odb/details/meta/class-p.hxx @@ -18,13 +18,14 @@ namespace odb { // g++ cannot have these inside class_p. // - template no class_p_test (...); - template yes class_p_test (void (Y::*) ()); + template no class_p_test (...); + template yes class_p_test (void (X::*) ()); template struct class_p { - static const bool r = sizeof (class_p_test (0)) == sizeof (yes); + static const bool result = + sizeof (class_p_test (0)) == sizeof (yes); }; } } diff --git a/odb/details/meta/polymorphic-p.hxx b/odb/details/meta/polymorphic-p.hxx index 1e58735..3215d63 100644 --- a/odb/details/meta/polymorphic-p.hxx +++ b/odb/details/meta/polymorphic-p.hxx @@ -9,7 +9,7 @@ #include #include -#include +#include namespace odb { @@ -20,12 +20,12 @@ namespace odb template struct polymorphic_p { - typedef typename remove_cv::r X; + typedef typename remove_const_volatile::result X; template struct impl { - static const bool r = false; + static const bool result = false; }; template @@ -44,10 +44,10 @@ namespace odb ~t2 () throw (); }; - static const bool r = sizeof (t1) == sizeof (t2); + static const bool result = sizeof (t1) == sizeof (t2); }; - static const bool r = impl::r>::r; + static const bool result = impl::result>::result; }; } } diff --git a/odb/details/meta/remove-c.hxx b/odb/details/meta/remove-c.hxx deleted file mode 100644 index f476dff..0000000 --- a/odb/details/meta/remove-c.hxx +++ /dev/null @@ -1,34 +0,0 @@ -// file : odb/details/meta/remove-c.hxx -// author : Boris Kolpackov -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_DETAILS_META_REMOVE_C_HXX -#define ODB_DETAILS_META_REMOVE_C_HXX - -#include - -namespace odb -{ - namespace details - { - namespace meta - { - template - struct remove_c - { - typedef X r; - }; - - template - struct remove_c - { - typedef X r; - }; - } - } -} - -#include - -#endif // ODB_DETAILS_META_REMOVE_C_HXX diff --git a/odb/details/meta/remove-const-volatile.hxx b/odb/details/meta/remove-const-volatile.hxx new file mode 100644 index 0000000..92f5e4f --- /dev/null +++ b/odb/details/meta/remove-const-volatile.hxx @@ -0,0 +1,33 @@ +// file : odb/details/meta/remove-const-volatile.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ODB_DETAILS_META_REMOVE_CONST_VOLATILE_HXX +#define ODB_DETAILS_META_REMOVE_CONST_VOLATILE_HXX + +#include + +#include +#include + +namespace odb +{ + namespace details + { + namespace meta + { + template + struct remove_const_volatile + { + typedef + typename remove_volatile::result>::result + result; + }; + } + } +} + +#include + +#endif // ODB_DETAILS_META_REMOVE_CONST_VOLATILE_HXX diff --git a/odb/details/meta/remove-const.hxx b/odb/details/meta/remove-const.hxx new file mode 100644 index 0000000..93e1f5f --- /dev/null +++ b/odb/details/meta/remove-const.hxx @@ -0,0 +1,34 @@ +// file : odb/details/meta/remove-const.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ODB_DETAILS_META_REMOVE_CONST_HXX +#define ODB_DETAILS_META_REMOVE_CONST_HXX + +#include + +namespace odb +{ + namespace details + { + namespace meta + { + template + struct remove_const + { + typedef X result; + }; + + template + struct remove_const + { + typedef X result; + }; + } + } +} + +#include + +#endif // ODB_DETAILS_META_REMOVE_CONST_HXX diff --git a/odb/details/meta/remove-cv.hxx b/odb/details/meta/remove-cv.hxx deleted file mode 100644 index bb28bbc..0000000 --- a/odb/details/meta/remove-cv.hxx +++ /dev/null @@ -1,31 +0,0 @@ -// file : odb/details/meta/remove-cv.hxx -// author : Boris Kolpackov -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_DETAILS_META_REMOVE_CV_HXX -#define ODB_DETAILS_META_REMOVE_CV_HXX - -#include - -#include -#include - -namespace odb -{ - namespace details - { - namespace meta - { - template - struct remove_cv - { - typedef typename remove_v::r>::r r; - }; - } - } -} - -#include - -#endif // ODB_DETAILS_META_REMOVE_CV_HXX diff --git a/odb/details/meta/remove-p.hxx b/odb/details/meta/remove-p.hxx deleted file mode 100644 index c04c64f..0000000 --- a/odb/details/meta/remove-p.hxx +++ /dev/null @@ -1,34 +0,0 @@ -// file : odb/details/meta/remove-p.hxx -// author : Boris Kolpackov -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_DETAILS_META_REMOVE_P_HXX -#define ODB_DETAILS_META_REMOVE_P_HXX - -#include - -namespace odb -{ - namespace details - { - namespace meta - { - template - struct remove_p - { - typedef X r; - }; - - template - struct remove_p - { - typedef X r; - }; - } - } -} - -#include - -#endif // ODB_DETAILS_META_REMOVE_P_HXX diff --git a/odb/details/meta/remove-pointer.hxx b/odb/details/meta/remove-pointer.hxx new file mode 100644 index 0000000..0c7ebf3 --- /dev/null +++ b/odb/details/meta/remove-pointer.hxx @@ -0,0 +1,34 @@ +// file : odb/details/meta/remove-pointer.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ODB_DETAILS_META_REMOVE_POINTER_HXX +#define ODB_DETAILS_META_REMOVE_POINTER_HXX + +#include + +namespace odb +{ + namespace details + { + namespace meta + { + template + struct remove_pointer + { + typedef X result; + }; + + template + struct remove_pointer + { + typedef X result; + }; + } + } +} + +#include + +#endif // ODB_DETAILS_META_REMOVE_POINTER_HXX diff --git a/odb/details/meta/remove-v.hxx b/odb/details/meta/remove-v.hxx deleted file mode 100644 index c4133da..0000000 --- a/odb/details/meta/remove-v.hxx +++ /dev/null @@ -1,34 +0,0 @@ -// file : odb/details/meta/remove-v.hxx -// author : Boris Kolpackov -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_DETAILS_META_REMOVE_V_HXX -#define ODB_DETAILS_META_REMOVE_V_HXX - -#include - -namespace odb -{ - namespace details - { - namespace meta - { - template - struct remove_v - { - typedef X r; - }; - - template - struct remove_v - { - typedef X r; - }; - } - } -} - -#include - -#endif // ODB_DETAILS_META_REMOVE_V_HXX diff --git a/odb/details/meta/remove-volatile.hxx b/odb/details/meta/remove-volatile.hxx new file mode 100644 index 0000000..ed194fa --- /dev/null +++ b/odb/details/meta/remove-volatile.hxx @@ -0,0 +1,34 @@ +// file : odb/details/meta/remove-volatile.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ODB_DETAILS_META_REMOVE_VOLATILE_HXX +#define ODB_DETAILS_META_REMOVE_VOLATILE_HXX + +#include + +namespace odb +{ + namespace details + { + namespace meta + { + template + struct remove_volatile + { + typedef X result; + }; + + template + struct remove_volatile + { + typedef X result; + }; + } + } +} + +#include + +#endif // ODB_DETAILS_META_REMOVE_VOLATILE_HXX diff --git a/odb/details/shared-ptr/base.txx b/odb/details/shared-ptr/base.txx index a57ce91..641ef3c 100644 --- a/odb/details/shared-ptr/base.txx +++ b/odb/details/shared-ptr/base.txx @@ -14,7 +14,7 @@ namespace odb { // Support for locating the counter in the memory block. // - template ::r> + template ::result> struct locator; template -- cgit v1.1