Skip to content

Commit

Permalink
language: Fix debug build errors with older Clang versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dscharrer committed Jan 2, 2025
1 parent f0359dc commit 06a38bf
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/setup/language.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,19 @@ struct windows_language {
boost::uint16_t language_id;
boost::uint16_t codepage;

bool operator<(boost::uint32_t language) const {
return language_id < language;
}

};

bool operator<(windows_language language, boost::uint32_t language_id) {
return language.language_id < language_id;
}

#if defined(__clang_major__) && __clang_major__ < 8
// Required for debug builds with Clang < 8
bool operator<(boost::uint32_t language_id, windows_language language) {
return language_id < language.language_id;
}
#endif

/*
* Sorted list of Windows language IDs with their default ANSI codepages.
* This list omits Unicode-only languages and languages using the default Windows-1252 codepage.
Expand Down

0 comments on commit 06a38bf

Please sign in to comment.