In my C++ program, I'm getting a segfault on a std::visit to a std::variant. The...
πΊπ¦ haxadecimal π«π @brouhaha@mastodon.social
In my C++ program, I'm getting a segfault on a std::visit to a std::variant. There are 14 types in the variant, indices 0 to 13, with the first (index 0) being std::monotype. When I try to look at the variable containing the variant, GDB says it is "std::variant [no contained value]". Sure enough, when I print the variant's private member _M_index, it is 224.
So, memory corruption.
:-(
#CPlusPlus