From 763b7d6c7072ea785b90056b423f7d727731e59c Mon Sep 17 00:00:00 2001 From: rdzehtsiar <105226800+rdzehtsiar@users.noreply.github.com> Date: Tue, 20 Sep 2022 07:04:18 +0200 Subject: [PATCH] Fix compilation errors in build for Oracle Solaris OS (#1133) On Oracle Solaris the following statement is declared in file /usr/include/sys/regset.h: #define SS 18 /* only stored on a privilege transition */ Because of this template type name SS is substituted by numeric literal, which results in a compilation error: error: expected nested-name-specifier before numeric constant Fixed by renaming template type names. Co-authored-by: Roman Degtyar --- include/yaml-cpp/traits.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/yaml-cpp/traits.h b/include/yaml-cpp/traits.h index 9a62db2..ffe9999 100644 --- a/include/yaml-cpp/traits.h +++ b/include/yaml-cpp/traits.h @@ -107,9 +107,9 @@ struct disable_if : public disable_if_c {}; template struct is_streamable { - template + template static auto test(int) - -> decltype(std::declval() << std::declval(), std::true_type()); + -> decltype(std::declval() << std::declval(), std::true_type()); template static auto test(...) -> std::false_type;