[Bug libstdc++/112642] ranges::fold_left tries to access inactive union member of string in constant expression
miro.palmu at helsinki dot fi
gcc-bugzilla@gcc.gnu.org
Mon Nov 20 16:50:59 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112642
--- Comment #3 from Miro Palmu <miro.palmu at helsinki dot fi> ---
Further reduced:
#include <string>
using namespace std::literals;
consteval void bar() {
auto _ = [](auto s) { return s; }(""s);
}
int main() {
bar();
return 0;
}
More information about the Gcc-bugs
mailing list