From 9b76dff6c12da601fc73f8e7923ac43ed82ad2fa Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 25 Mar 2014 12:43:00 +0100 Subject: [PATCH] Add an assertion to check that the right overload is executed --- .../config/testfiles/CGAL_CFG_MATCHING_BUG_7.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Installation/config/testfiles/CGAL_CFG_MATCHING_BUG_7.cpp b/Installation/config/testfiles/CGAL_CFG_MATCHING_BUG_7.cpp index e999b8bd4f1..6e42900b2f3 100644 --- a/Installation/config/testfiles/CGAL_CFG_MATCHING_BUG_7.cpp +++ b/Installation/config/testfiles/CGAL_CFG_MATCHING_BUG_7.cpp @@ -21,6 +21,10 @@ //| This flag is set if the compiler bugs with some "using Base::Member;" in //| a derived class. The workaround is to write a forwarder or not use using. +#include + +int I; + struct Point { }; @@ -38,7 +42,7 @@ struct Conv Conv() {} template - void operator()(const T& t){} + void operator()(const T& t){ I = 1;} }; @@ -48,17 +52,20 @@ struct WConv : Conv WConv() {} - void operator()(const WP& w){} + void operator()(const WP& w){I=2;} + }; int main() { + I = 0; Point p; WConv wconv; wconv(p); + assert(I==1); return 0; }