summaryrefslogtreecommitdiff
path: root/tests/test-math-c++.cc
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-11-14 23:08:21 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2016-11-15 09:12:53 -0800
commitc907efdb0747b408dd4d3dfbc9edf7c4086c9b51 (patch)
tree5ad0c54bd5218917478883344f83395501d18ef9 /tests/test-math-c++.cc
parentc3b131294aa42b7997cc9b9a0bbb2934aa27fd6c (diff)
downloadgnulib-c907efdb0747b408dd4d3dfbc9edf7c4086c9b51.tar.gz
snippet/c++defs: fix real-floating arg functions in C++ mode
Also, define isfinite, isinf, isnan, signbit in the gnulib namespace instead of in the global namespace. * build-aux/snippet/c++defs.h (_GL_BEGIN_NAMESPACE) (_GL_END_NAMESPACE): New. * lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_2): Use them. (isfinite, isinf, isnan, signbit) [__cplusplus && GNULIB_NAMESPACE]: Define them in the GNULIB_NAMESPACE namespace instead of in the global namespace. * tests/test-math-c++.cc: Check that the isfinite, isinf, isnan, signbit overloads exist in the GNULIB_NAMESPACE namespace, instead of in the global namespace.
Diffstat (limited to 'tests/test-math-c++.cc')
-rw-r--r--tests/test-math-c++.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test-math-c++.cc b/tests/test-math-c++.cc
index f0f14481ab..cc7378c3a2 100644
--- a/tests/test-math-c++.cc
+++ b/tests/test-math-c++.cc
@@ -24,7 +24,8 @@
#include "signature.h"
/* Signature check for a function that takes a real-floating argument.
- Check that each overloaded function with the specified signature exists. */
+ Check that each overloaded function with the specified signature
+ exists in the GNULIB_NAMESPACE namespace. */
#define REAL_FLOATING_CHECK(func,\
rettype1, parameters1,\
rettype2, parameters2,\
@@ -34,7 +35,7 @@
OVERLOADED_CHECK (func, rettype3, parameters3, _3)
#define OVERLOADED_CHECK(func, rettype, parameters, suffix) \
static rettype (* _GL_UNUSED signature_check_ ## func ## suffix) parameters \
- = static_cast<rettype(*)parameters>(func)
+ = static_cast<rettype(*)parameters>(GNULIB_NAMESPACE::func)
/* Keep these checks in the same order as math.in.h! */