aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/details/meta/class-p.hxx7
-rw-r--r--odb/details/meta/polymorphic-p.hxx10
-rw-r--r--odb/details/meta/remove-const-volatile.hxx33
-rw-r--r--odb/details/meta/remove-const.hxx (renamed from odb/details/meta/remove-c.hxx)16
-rw-r--r--odb/details/meta/remove-cv.hxx31
-rw-r--r--odb/details/meta/remove-pointer.hxx (renamed from odb/details/meta/remove-p.hxx)16
-rw-r--r--odb/details/meta/remove-volatile.hxx (renamed from odb/details/meta/remove-v.hxx)16
-rw-r--r--odb/details/shared-ptr/base.txx2
8 files changed, 67 insertions, 64 deletions
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 <typename Y> no class_p_test (...);
- template <typename Y> yes class_p_test (void (Y::*) ());
+ template <typename X> no class_p_test (...);
+ template <typename X> yes class_p_test (void (X::*) ());
template <typename X>
struct class_p
{
- static const bool r = sizeof (class_p_test<X> (0)) == sizeof (yes);
+ static const bool result =
+ sizeof (class_p_test<X> (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 <odb/pre.hxx>
#include <odb/details/meta/class-p.hxx>
-#include <odb/details/meta/remove-cv.hxx>
+#include <odb/details/meta/remove-const-volatile.hxx>
namespace odb
{
@@ -20,12 +20,12 @@ namespace odb
template <typename CVX>
struct polymorphic_p
{
- typedef typename remove_cv<CVX>::r X;
+ typedef typename remove_const_volatile<CVX>::result X;
template <typename Y, bool C>
struct impl
{
- static const bool r = false;
+ static const bool result = false;
};
template <typename Y>
@@ -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<X, class_p<X>::r>::r;
+ static const bool result = impl<X, class_p<X>::result>::result;
};
}
}
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 <boris@codesynthesis.com>
+// 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 <odb/pre.hxx>
+
+#include <odb/details/meta/remove-const.hxx>
+#include <odb/details/meta/remove-volatile.hxx>
+
+namespace odb
+{
+ namespace details
+ {
+ namespace meta
+ {
+ template <typename X>
+ struct remove_const_volatile
+ {
+ typedef
+ typename remove_volatile<typename remove_const<X>::result>::result
+ result;
+ };
+ }
+ }
+}
+
+#include <odb/post.hxx>
+
+#endif // ODB_DETAILS_META_REMOVE_CONST_VOLATILE_HXX
diff --git a/odb/details/meta/remove-c.hxx b/odb/details/meta/remove-const.hxx
index f476dff..93e1f5f 100644
--- a/odb/details/meta/remove-c.hxx
+++ b/odb/details/meta/remove-const.hxx
@@ -1,10 +1,10 @@
-// file : odb/details/meta/remove-c.hxx
+// file : odb/details/meta/remove-const.hxx
// author : Boris Kolpackov <boris@codesynthesis.com>
// 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
+#ifndef ODB_DETAILS_META_REMOVE_CONST_HXX
+#define ODB_DETAILS_META_REMOVE_CONST_HXX
#include <odb/pre.hxx>
@@ -15,15 +15,15 @@ namespace odb
namespace meta
{
template <typename X>
- struct remove_c
+ struct remove_const
{
- typedef X r;
+ typedef X result;
};
template <typename X>
- struct remove_c<X const>
+ struct remove_const<const X>
{
- typedef X r;
+ typedef X result;
};
}
}
@@ -31,4 +31,4 @@ namespace odb
#include <odb/post.hxx>
-#endif // ODB_DETAILS_META_REMOVE_C_HXX
+#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 <boris@codesynthesis.com>
-// 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 <odb/pre.hxx>
-
-#include <odb/details/meta/remove-c.hxx>
-#include <odb/details/meta/remove-v.hxx>
-
-namespace odb
-{
- namespace details
- {
- namespace meta
- {
- template <typename X>
- struct remove_cv
- {
- typedef typename remove_v<typename remove_c<X>::r>::r r;
- };
- }
- }
-}
-
-#include <odb/post.hxx>
-
-#endif // ODB_DETAILS_META_REMOVE_CV_HXX
diff --git a/odb/details/meta/remove-p.hxx b/odb/details/meta/remove-pointer.hxx
index c04c64f..0c7ebf3 100644
--- a/odb/details/meta/remove-p.hxx
+++ b/odb/details/meta/remove-pointer.hxx
@@ -1,10 +1,10 @@
-// file : odb/details/meta/remove-p.hxx
+// file : odb/details/meta/remove-pointer.hxx
// author : Boris Kolpackov <boris@codesynthesis.com>
// 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
+#ifndef ODB_DETAILS_META_REMOVE_POINTER_HXX
+#define ODB_DETAILS_META_REMOVE_POINTER_HXX
#include <odb/pre.hxx>
@@ -15,15 +15,15 @@ namespace odb
namespace meta
{
template <typename X>
- struct remove_p
+ struct remove_pointer
{
- typedef X r;
+ typedef X result;
};
template <typename X>
- struct remove_p<X*>
+ struct remove_pointer<X*>
{
- typedef X r;
+ typedef X result;
};
}
}
@@ -31,4 +31,4 @@ namespace odb
#include <odb/post.hxx>
-#endif // ODB_DETAILS_META_REMOVE_P_HXX
+#endif // ODB_DETAILS_META_REMOVE_POINTER_HXX
diff --git a/odb/details/meta/remove-v.hxx b/odb/details/meta/remove-volatile.hxx
index c4133da..ed194fa 100644
--- a/odb/details/meta/remove-v.hxx
+++ b/odb/details/meta/remove-volatile.hxx
@@ -1,10 +1,10 @@
-// file : odb/details/meta/remove-v.hxx
+// file : odb/details/meta/remove-volatile.hxx
// author : Boris Kolpackov <boris@codesynthesis.com>
// 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
+#ifndef ODB_DETAILS_META_REMOVE_VOLATILE_HXX
+#define ODB_DETAILS_META_REMOVE_VOLATILE_HXX
#include <odb/pre.hxx>
@@ -15,15 +15,15 @@ namespace odb
namespace meta
{
template <typename X>
- struct remove_v
+ struct remove_volatile
{
- typedef X r;
+ typedef X result;
};
template <typename X>
- struct remove_v<X volatile>
+ struct remove_volatile<volatile X>
{
- typedef X r;
+ typedef X result;
};
}
}
@@ -31,4 +31,4 @@ namespace odb
#include <odb/post.hxx>
-#endif // ODB_DETAILS_META_REMOVE_V_HXX
+#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 <typename X, bool poly = meta::polymorphic_p<X>::r>
+ template <typename X, bool poly = meta::polymorphic_p<X>::result>
struct locator;
template <typename X>