aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-10-11 07:33:23 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-10-11 07:33:23 +0200
commit14e616a31fb4f63f48377fd1f4f4abac16555428 (patch)
treed7d418c1d956156822a402cef7c097fc22936359
parentbef8ac3c3489589fa84c7b9d69585fb6fd771c3f (diff)
Reimplement class_p in a more portable way
-rw-r--r--cutl/meta/class-p.hxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/cutl/meta/class-p.hxx b/cutl/meta/class-p.hxx
index 79e8469..da1eb89 100644
--- a/cutl/meta/class-p.hxx
+++ b/cutl/meta/class-p.hxx
@@ -12,14 +12,15 @@ 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
{
- template <typename Y> static no test (...);
- template <typename Y> static yes test (void* Y::*);
-
- static bool const r = sizeof (
- class_p<X>::template test<X> (0)) == sizeof (yes);
+ static bool const r = sizeof (class_p_test<X> (0)) == sizeof (yes);
};
}
}