diff options
Diffstat (limited to 'cutl/meta')
-rw-r--r-- | cutl/meta/class-p.hxx | 11 |
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); }; } } |