From 1666dd3c8f675ac3259b2d2f4a981d943f0833ac Mon Sep 17 00:00:00 2001 From: Alisdair Meredith Date: Fri, 31 Jan 2025 14:04:53 -0500 Subject: [PATCH] [cmath.syn] Consolidate std namespaces There is no ordering dependency between the two typedefs in namespace std, the macros that follow, and teh next opening of namespace std, so move the two typedefs to avoid repeatedly opening an closing the namespace. Note that we could have done this without moving the typedefs as macros are not bound by namespaces, but our convention very sensibly avoids confusing readers by keeping macro definitions outside of namespaces. --- source/numerics.tex | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index 95ff3af851..04b4bd88e6 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -9304,11 +9304,6 @@ \indexlibraryglobal{truncf}% \indexlibraryglobal{truncl}% \begin{codeblock} -namespace std { - using float_t = @\seebelow@; - using double_t = @\seebelow@; -} - #define @\libmacro{HUGE_VAL}@ @\seebelow@ #define @\libmacro{HUGE_VALF}@ @\seebelow@ #define @\libmacro{HUGE_VALL}@ @\seebelow@ @@ -9330,6 +9325,9 @@ #define @\libmacro{math_errhandling}@ @\seebelow@ namespace std { + using float_t = @\seebelow@; + using double_t = @\seebelow@; + constexpr @\placeholdernc{floating-point-type}@ acos(@\placeholdernc{floating-point-type}@ x); constexpr float acosf(float x); constexpr long double acosl(long double x);