mirror of https://github.com/zeldaret/botw.git
ksys/util: Fix C++17 compliance in FixedString
Lambda expressions cannot appear in a template argument pre-C++20.
This commit is contained in:
parent
d10dd65dcd
commit
b63c16c55f
|
@ -56,13 +56,14 @@ template <auto N, int base = 10>
|
||||||
constexpr auto Str() {
|
constexpr auto Str() {
|
||||||
constexpr char digits[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
constexpr char digits[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||||
|
|
||||||
FixedString<([]() constexpr noexcept {
|
constexpr auto len = [] {
|
||||||
unsigned int len = N > 0 ? 0 : 1;
|
unsigned int len = N > 0 ? 0 : 1;
|
||||||
for (auto n = N; n; len++, n /= base)
|
for (auto n = N; n; len++, n /= base)
|
||||||
continue;
|
continue;
|
||||||
return len;
|
return len;
|
||||||
}())>
|
}();
|
||||||
buf{};
|
|
||||||
|
FixedString<len> buf{};
|
||||||
|
|
||||||
auto ptr = buf.data() + buf.length();
|
auto ptr = buf.data() + buf.length();
|
||||||
if (N == 0) {
|
if (N == 0) {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 9a9252a54a67f54c066966f8f0599c450391bd44
|
Subproject commit 25ed8669943bee65a650700d340e451eda2a26ba
|
Loading…
Reference in New Issue