[PATCH] D90320: [llvm][StringExtras] Use a lookup table for `hexDigitValue`
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 28 13:58:33 PDT 2020
dblaikie accepted this revision.
dblaikie added a comment.
Nice!
I guess in C++20 we could change this to something like:
constexpr std::array<int, 3> a = [] {
std::array<int, 3> r;
int i = 0;
for (auto &v : r) {
v = ++i;
}
return r;
}();
But based on godbolt testing at least, std::array's ctor isn't constexpr until 20. Oh well.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90320/new/
https://reviews.llvm.org/D90320
More information about the llvm-commits
mailing list