From 2cd336e44998f193e5b635403d4302502132c622 Mon Sep 17 00:00:00 2001 From: DiKetarogg Date: Wed, 24 Sep 2025 12:14:47 +0300 Subject: [PATCH 1/2] Added type_traits for std::conditional --- FixedWidthIntLiterals.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/FixedWidthIntLiterals.h b/FixedWidthIntLiterals.h index e197e4c..58d1729 100644 --- a/FixedWidthIntLiterals.h +++ b/FixedWidthIntLiterals.h @@ -53,6 +53,8 @@ #include #include +#include + #ifndef SCW_FIXEDWIDTH_INT_LITERALS_NAMESPACE #define SCW_FIXEDWIDTH_INT_LITERALS_NAMESPACE scw #endif From 4bbf5fc83bc5a9e1b59db450859bfa48caeaabdb Mon Sep 17 00:00:00 2001 From: DiKetarogg Date: Wed, 24 Sep 2025 12:18:36 +0300 Subject: [PATCH 2/2] Removed the space to fix preceded by whitespace in a literal operator declaration is deprecated [-Wdeprecated-literal-operator] warning. --- FixedWidthIntLiterals.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FixedWidthIntLiterals.h b/FixedWidthIntLiterals.h index 58d1729..2b2923a 100644 --- a/FixedWidthIntLiterals.h +++ b/FixedWidthIntLiterals.h @@ -163,7 +163,7 @@ SCW_FIXEDWIDTH_DEFINE_CHECK_VALID_FUNC(size_t, "size_t literal out of range."); /// Finally the user-defined literal operators. Again with the macros? #define SCW_FIXEDWIDTH_DEFINE_INTEGER_OPERATOR(typesuffix_, typename_) \ template \ - constexpr typename_ operator"" typesuffix_() { \ + constexpr typename_ operator""##typesuffix_() { \ return detail::checkValid_##typename_()>(); \ }