Skip to content

Commit

Permalink
Fix compilation errors in build for Oracle Solaris OS (jbeder#1133)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rdzehtsiar and Roman Degtyar authored Sep 20, 2022
1 parent e87ed7e commit 763b7d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/yaml-cpp/traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ struct disable_if : public disable_if_c<Cond::value, T> {};

template <typename S, typename T>
struct is_streamable {
template <typename SS, typename TT>
template <typename StreamT, typename ValueT>
static auto test(int)
-> decltype(std::declval<SS&>() << std::declval<TT>(), std::true_type());
-> decltype(std::declval<StreamT&>() << std::declval<ValueT>(), std::true_type());

template <typename, typename>
static auto test(...) -> std::false_type;
Expand Down

0 comments on commit 763b7d6

Please sign in to comment.