mirror of
https://github.com/YosysHQ/yosys
synced 2026-05-18 07:59:31 +00:00
Merge pull request #5882 from YosysHQ/std_cpp20
Bump required standard to C++20
This commit is contained in:
commit
1d87cefd80
13 changed files with 42 additions and 32 deletions
|
|
@ -804,8 +804,10 @@ std::string Fmt::render() const
|
|||
buf += 'X';
|
||||
else if (has_z)
|
||||
buf += 'Z';
|
||||
else
|
||||
buf += (part.hex_upper ? "0123456789ABCDEF" : "0123456789abcdef")[subvalue.as_int()];
|
||||
else {
|
||||
const char *digits = part.hex_upper ? "0123456789ABCDEF" : "0123456789abcdef";
|
||||
buf += digits[subvalue.as_int()];
|
||||
}
|
||||
}
|
||||
} else if (part.base == 10) {
|
||||
if (part.show_base)
|
||||
|
|
|
|||
|
|
@ -475,7 +475,8 @@ public:
|
|||
private:
|
||||
std::string_view fmt;
|
||||
bool has_escapes = false;
|
||||
FoundFormatSpec specs[sizeof...(Args)] = {};
|
||||
// Making array at least size of one to make MSVC happy and strict to standards
|
||||
FoundFormatSpec specs[sizeof...(Args) ? sizeof...(Args) : 1] = {};
|
||||
};
|
||||
|
||||
template <typename T> struct WrapType { using type = T; };
|
||||
|
|
|
|||
|
|
@ -120,10 +120,10 @@
|
|||
# define YS_MAYBE_UNUSED
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
#if __cplusplus >= 202002L
|
||||
# define YS_FALLTHROUGH [[fallthrough]];
|
||||
#else
|
||||
# error "C++17 or later compatible compiler is required"
|
||||
# error "C++20 or later compatible compiler is required"
|
||||
#endif
|
||||
|
||||
#if defined(__has_cpp_attribute) && __has_cpp_attribute(gnu::cold)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue