#include "https://raw.githubusercontent.com/tcbrindle/flux/main/single_include/flux.hpp"
using namespace flux;
auto intersperse(auto&& r, auto&& e) -> auto { return FLUX_FWD(r).map([_0 = e](auto const& x) -> auto { return std::vector{_0, x}; }).flatten().drop(1); }
auto sfml_argument(std::string_view) -> std::string { return "abc"; }
auto sfml_argument_list(std::span<std::string_view> mf) -> std::string {
return "(" + intersperse(drop(mf, 1).map(sfml_argument), std::string(", ")).flatten().to<std::string>() + ")"; }
auto main() -> int{
std::vector<std::string_view> v {"point"};
(void)sfml_argument_list(v);
}
/app/raw.githubusercontent.com/tcbrindle/flux/main/single_include/flux.hpp:1136: Fatal error: assertion 'self.has_value()' failed
terminate called without an active exception
Program terminated with signal: SIGSEGV
An assertion is triggered due to the
drop
inintersperse
. See https://cpp1.godbolt.org/z/ff99sqcK5:The same happens here (https://cpp1.godbolt.org/z/s4xGzzK3j):