From 14e616a31fb4f63f48377fd1f4f4abac16555428 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 11 Oct 2009 07:33:23 +0200 Subject: Reimplement class_p in a more portable way --- cutl/meta/class-p.hxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'cutl/meta') 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 no class_p_test (...); + template yes class_p_test (void (Y::*) ()); + template struct class_p { - template static no test (...); - template static yes test (void* Y::*); - - static bool const r = sizeof ( - class_p::template test (0)) == sizeof (yes); + static bool const r = sizeof (class_p_test (0)) == sizeof (yes); }; } } -- cgit v1.1