Closed KOLANICH closed 1 year ago
Hi, thank you for report, there is multiple workarounds:
1) the one you mentioned
2) match.get<2>().to_string()
3) std::string(match.get<2>())
(avoid using {}
as it using std::initialized_lists
and looks anything convertible to char
which select operator bool
I made change in latest main, where operator bool
is now explicit for captures (not for result tuple type), which fixes it for you.
Thank you for the explaination and for the fix.
My guess is that
nameS
must be the same as2
.Tested with
Debian clang version 17.0.0 (++20230129100618+fd9f42fad22c-1~exp1~20230129220727.1072)
(
clang++ -O3 -std=gnu++2b ./test.cpp -o test
)and
g++ (Debian 12.2.0-14) 12.2.0
(
g++ -O3 -std=gnu++2b ./test.cpp -o test
)Workaround: