[Bug libstdc++/103924] views::join combined with std::string cannot be used in constant expressions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103924 --- Comment #4 from 康桓瑋 --- (In reply to Patrick Palka from comment #2) > *** Bug 114530 has been marked as a duplicate of this bug. *** That's my lost memory.
[Bug libstdc++/103924] views::join combined with std::string cannot be used in constant expressions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103924 --- Comment #3 from Patrick Palka --- >From PR114530: #include #include static_assert( std::ranges::distance( std::views::single(std::views::cartesian_product(std::string{})) | std::views::join ) == 0 );
[Bug libstdc++/103924] views::join combined with std::string cannot be used in constant expressions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103924 --- Comment #2 from Patrick Palka --- *** Bug 114530 has been marked as a duplicate of this bug. ***
[Bug libstdc++/103924] views::join combined with std::string cannot be used in constant expressions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103924 --- Comment #1 from Patrick Palka --- I encountered a similar problem when testing views::join_with: #include #include constexpr std::string_view rs[] = {"42"}; static_assert(!std::ranges::empty(rs | std::views::join_with(std::string(""; error: accessing ‘std::__cxx11::basic_string_M_allocated_capacity’ member instead of initialized ‘std::__cxx11::basic_string_M_local_buf’ member in constant expression
[Bug libstdc++/103924] views::join combined with std::string cannot be used in constant expressions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103924 Patrick Palka changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed||2022-01-06 Status|UNCONFIRMED |NEW CC||ppalka at gcc dot gnu.org