Eliminate 'constructor with 1 argument is not explicit' warnings in test_cpp
authorIvan Maidanski <ivmai@mail.ru>
Tue, 18 Oct 2016 08:50:14 +0000 (11:50 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 18 Oct 2016 08:50:14 +0000 (11:50 +0300)
(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

index 642bdfd..cec6989 100644 (file)
@@ -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: