From 78113014d0ea140aed8ec63b9bc1902edd59b9bc Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 18 Oct 2016 11:50:14 +0300 Subject: [PATCH] Eliminate 'constructor with 1 argument is not explicit' warnings in test_cpp (fix commit 569fd66) * tests/test_cpp.cc (GC_ATTR_EXPLICIT): Define macro in the same way as in include/gc_allocator.h. --- tests/test_cpp.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_cpp.cc b/tests/test_cpp.cc index 642bdfd..cec6989 100644 --- a/tests/test_cpp.cc +++ b/tests/test_cpp.cc @@ -77,7 +77,11 @@ extern "C" { #endif #ifndef GC_ATTR_EXPLICIT -# define GC_ATTR_EXPLICIT /* empty */ +# if (__cplusplus >= 201103L) || defined(CPPCHECK) +# define GC_ATTR_EXPLICIT explicit +# else +# define GC_ATTR_EXPLICIT /* empty */ +# endif #endif class A {public: -- 2.7.4