gcc/libstdc++-v3/include/c_compatibility
Jonathan Wakely e2186cd88e In C++17 <math.h> should not put special functions in global namespace
IS 29124 8.2 [sf.mathh] says that <math.h> should add the names of the
special functions to the global namespace.  However, C++17 Annex D
[depr.c.headers] excludes those functions explicitly, so they should not
be placed in the global namespace unconditionally for C++17.

Only add them to the global namespace when IS 29124 is explicitly
requested via the __STDCPP_WANT_MATH_SPEC_FUNCS__ macro.

	* include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
	(assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
	(assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
	(comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
	(comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
	(cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
	(cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
	(cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
	(ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
	(ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
	(hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
	(legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
	(sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
	(sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
	when the special functions IS is enabled, not for C++17.
	* testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
	Replace with ...
	* testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
	without checks for special functions in C++17.
	* testsuite/26_numerics/headers/cmath/special_functions_global.cc:
	New test.

From-SVN: r269837
2019-03-21 14:03:56 +00:00
..
assert.h Update copyright years. 2019-01-01 13:31:55 +01:00
complex.h Update copyright years. 2019-01-01 13:31:55 +01:00
ctype.h Update copyright years. 2019-01-01 13:31:55 +01:00
errno.h Update copyright years. 2019-01-01 13:31:55 +01:00
fenv.h Update copyright years. 2019-01-01 13:31:55 +01:00
float.h Update copyright years. 2019-01-01 13:31:55 +01:00
inttypes.h Update copyright years. 2019-01-01 13:31:55 +01:00
iso646.h Update copyright years. 2019-01-01 13:31:55 +01:00
limits.h Update copyright years. 2019-01-01 13:31:55 +01:00
locale.h Update copyright years. 2019-01-01 13:31:55 +01:00
math.h In C++17 <math.h> should not put special functions in global namespace 2019-03-21 14:03:56 +00:00
setjmp.h Update copyright years. 2019-01-01 13:31:55 +01:00
signal.h Update copyright years. 2019-01-01 13:31:55 +01:00
stdarg.h Update copyright years. 2019-01-01 13:31:55 +01:00
stdbool.h Update copyright years. 2019-01-01 13:31:55 +01:00
stddef.h Update copyright years. 2019-01-01 13:31:55 +01:00
stdint.h Update copyright years. 2019-01-01 13:31:55 +01:00
stdio.h Update copyright years. 2019-01-01 13:31:55 +01:00
stdlib.h Update copyright years. 2019-01-01 13:31:55 +01:00
string.h Update copyright years. 2019-01-01 13:31:55 +01:00
tgmath.h Update copyright years. 2019-01-01 13:31:55 +01:00
time.h Update copyright years. 2019-01-01 13:31:55 +01:00
uchar.h Update copyright years. 2019-01-01 13:31:55 +01:00
wchar.h Update copyright years. 2019-01-01 13:31:55 +01:00
wctype.h Update copyright years. 2019-01-01 13:31:55 +01:00