From c825582c025037fc71789a0b9064a70f8393d0d1 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 6 Jan 2025 10:12:09 -0500 Subject: [PATCH] Fix deprecated whitespace in literal definition --- include/boost/decimal/literals.hpp | 75 +++++++++++++++--------------- 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/include/boost/decimal/literals.hpp b/include/boost/decimal/literals.hpp index 73d55540..7ae4e398 100644 --- a/include/boost/decimal/literals.hpp +++ b/include/boost/decimal/literals.hpp @@ -18,232 +18,233 @@ #include #endif -namespace boost { namespace decimal { +namespace boost { +namespace decimal { -BOOST_DECIMAL_EXPORT constexpr auto operator "" _DF(const char* str) -> decimal32 +BOOST_DECIMAL_EXPORT constexpr auto operator ""_DF(const char* str) -> decimal32 { decimal32 d; from_chars(str, str + detail::strlen(str), d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _df(const char* str) -> decimal32 +BOOST_DECIMAL_EXPORT constexpr auto operator ""_df(const char* str) -> decimal32 { decimal32 d; from_chars(str, str + detail::strlen(str), d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _DF(const char* str, std::size_t len) -> decimal32 +BOOST_DECIMAL_EXPORT constexpr auto operator ""_DF(const char* str, std::size_t len) -> decimal32 { decimal32 d; from_chars(str, str + len, d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _df(const char* str, std::size_t len) -> decimal32 +BOOST_DECIMAL_EXPORT constexpr auto operator ""_df(const char* str, std::size_t len) -> decimal32 { decimal32 d; from_chars(str, str + len, d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _DF(unsigned long long v) -> decimal32 +BOOST_DECIMAL_EXPORT constexpr auto operator ""_DF(unsigned long long v) -> decimal32 { return decimal32{v}; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _df(unsigned long long v) -> decimal32 +BOOST_DECIMAL_EXPORT constexpr auto operator ""_df(unsigned long long v) -> decimal32 { return decimal32{v}; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _DFF(const char* str) -> decimal32_fast +BOOST_DECIMAL_EXPORT constexpr auto operator ""_DFF(const char* str) -> decimal32_fast { decimal32_fast d; from_chars(str, str + detail::strlen(str), d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _dff(const char* str) -> decimal32_fast +BOOST_DECIMAL_EXPORT constexpr auto operator ""_dff(const char* str) -> decimal32_fast { decimal32_fast d; from_chars(str, str + detail::strlen(str), d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _DFF(const char* str, std::size_t len) -> decimal32_fast +BOOST_DECIMAL_EXPORT constexpr auto operator ""_DFF(const char* str, std::size_t len) -> decimal32_fast { decimal32_fast d; from_chars(str, str + len, d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _dff(const char* str, std::size_t len) -> decimal32_fast +BOOST_DECIMAL_EXPORT constexpr auto operator ""_dff(const char* str, std::size_t len) -> decimal32_fast { decimal32_fast d; from_chars(str, str + len, d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _DFF(unsigned long long v) -> decimal32_fast +BOOST_DECIMAL_EXPORT constexpr auto operator ""_DFF(unsigned long long v) -> decimal32_fast { return decimal32_fast{v}; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _dff(unsigned long long v) -> decimal32_fast +BOOST_DECIMAL_EXPORT constexpr auto operator ""_dff(unsigned long long v) -> decimal32_fast { return decimal32_fast{v}; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _DD(const char* str) -> decimal64 +BOOST_DECIMAL_EXPORT constexpr auto operator ""_DD(const char* str) -> decimal64 { decimal64 d; from_chars(str, str + detail::strlen(str), d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _dd(const char* str) -> decimal64 +BOOST_DECIMAL_EXPORT constexpr auto operator ""_dd(const char* str) -> decimal64 { decimal64 d; from_chars(str, str + detail::strlen(str), d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _DD(const char* str, std::size_t) -> decimal64 +BOOST_DECIMAL_EXPORT constexpr auto operator ""_DD(const char* str, std::size_t) -> decimal64 { decimal64 d; from_chars(str, str + detail::strlen(str), d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _dd(const char* str, std::size_t) -> decimal64 +BOOST_DECIMAL_EXPORT constexpr auto operator ""_dd(const char* str, std::size_t) -> decimal64 { decimal64 d; from_chars(str, str + detail::strlen(str), d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _DD(unsigned long long v) -> decimal64 +BOOST_DECIMAL_EXPORT constexpr auto operator ""_DD(unsigned long long v) -> decimal64 { return decimal64{v}; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _dd(unsigned long long v) -> decimal64 +BOOST_DECIMAL_EXPORT constexpr auto operator ""_dd(unsigned long long v) -> decimal64 { return decimal64{v}; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _DDF(const char* str) -> decimal64_fast +BOOST_DECIMAL_EXPORT constexpr auto operator ""_DDF(const char* str) -> decimal64_fast { decimal64_fast d; from_chars(str, str + detail::strlen(str), d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _ddf(const char* str) -> decimal64_fast +BOOST_DECIMAL_EXPORT constexpr auto operator ""_ddf(const char* str) -> decimal64_fast { decimal64_fast d; from_chars(str, str + detail::strlen(str), d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _DDF(const char* str, std::size_t len) -> decimal64_fast +BOOST_DECIMAL_EXPORT constexpr auto operator ""_DDF(const char* str, std::size_t len) -> decimal64_fast { decimal64_fast d; from_chars(str, str + len, d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _ddf(const char* str, std::size_t len) -> decimal64_fast +BOOST_DECIMAL_EXPORT constexpr auto operator ""_ddf(const char* str, std::size_t len) -> decimal64_fast { decimal64_fast d; from_chars(str, str + len, d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _DDF(unsigned long long v) -> decimal64_fast +BOOST_DECIMAL_EXPORT constexpr auto operator ""_DDF(unsigned long long v) -> decimal64_fast { return decimal64_fast{v}; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _ddf(unsigned long long v) -> decimal64_fast +BOOST_DECIMAL_EXPORT constexpr auto operator ""_ddf(unsigned long long v) -> decimal64_fast { return decimal64_fast{v}; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _DL(const char* str) -> decimal128 +BOOST_DECIMAL_EXPORT constexpr auto operator ""_DL(const char* str) -> decimal128 { decimal128 d; from_chars(str, str + detail::strlen(str), d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _dl(const char* str) -> decimal128 +BOOST_DECIMAL_EXPORT constexpr auto operator ""_dl(const char* str) -> decimal128 { decimal128 d; from_chars(str, str + detail::strlen(str), d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _DL(const char* str, std::size_t) -> decimal128 +BOOST_DECIMAL_EXPORT constexpr auto operator ""_DL(const char* str, std::size_t) -> decimal128 { decimal128 d; from_chars(str, str + detail::strlen(str), d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _dl(const char* str, std::size_t) -> decimal128 +BOOST_DECIMAL_EXPORT constexpr auto operator ""_dl(const char* str, std::size_t) -> decimal128 { decimal128 d; from_chars(str, str + detail::strlen(str), d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _DL(unsigned long long v) -> decimal128 +BOOST_DECIMAL_EXPORT constexpr auto operator ""_DL(unsigned long long v) -> decimal128 { return decimal128{v}; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _dl(unsigned long long v) -> decimal128 +BOOST_DECIMAL_EXPORT constexpr auto operator ""_dl(unsigned long long v) -> decimal128 { return decimal128{v}; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _DLF(const char* str) -> decimal128_fast +BOOST_DECIMAL_EXPORT constexpr auto operator ""_DLF(const char* str) -> decimal128_fast { decimal128_fast d; from_chars(str, str + detail::strlen(str), d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _dlf(const char* str) -> decimal128_fast +BOOST_DECIMAL_EXPORT constexpr auto operator ""_dlf(const char* str) -> decimal128_fast { decimal128_fast d; from_chars(str, str + detail::strlen(str), d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _DLF(const char* str, std::size_t len) -> decimal128_fast +BOOST_DECIMAL_EXPORT constexpr auto operator ""_DLF(const char* str, std::size_t len) -> decimal128_fast { decimal128_fast d; from_chars(str, str + len, d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _dlf(const char* str, std::size_t len) -> decimal128_fast +BOOST_DECIMAL_EXPORT constexpr auto operator ""_dlf(const char* str, std::size_t len) -> decimal128_fast { decimal128_fast d; from_chars(str, str + len, d); return d; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _DLF(unsigned long long v) -> decimal128_fast +BOOST_DECIMAL_EXPORT constexpr auto operator ""_DLF(unsigned long long v) -> decimal128_fast { return decimal128_fast{v}; } -BOOST_DECIMAL_EXPORT constexpr auto operator "" _dlf(unsigned long long v) -> decimal128_fast +BOOST_DECIMAL_EXPORT constexpr auto operator ""_dlf(unsigned long long v) -> decimal128_fast { return decimal128_fast{v}; }