mirror of
https://github.com/zeldaret/botw
synced 2026-05-22 22:44:18 -04:00
ksys/util: Fix C++17 compliance in FixedString
Lambda expressions cannot appear in a template argument pre-C++20.
This commit is contained in:
@@ -56,13 +56,14 @@ template <auto N, int base = 10>
|
||||
constexpr auto Str() {
|
||||
constexpr char digits[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
|
||||
FixedString<([]() constexpr noexcept {
|
||||
constexpr auto len = [] {
|
||||
unsigned int len = N > 0 ? 0 : 1;
|
||||
for (auto n = N; n; len++, n /= base)
|
||||
continue;
|
||||
return len;
|
||||
}())>
|
||||
buf{};
|
||||
}();
|
||||
|
||||
FixedString<len> buf{};
|
||||
|
||||
auto ptr = buf.data() + buf.length();
|
||||
if (N == 0) {
|
||||
|
||||
+1
-1
Submodule toolchain/musl updated: 9a9252a54a...25ed866994
Reference in New Issue
Block a user