Hey, I've recently tried to use the c++17 std::variant feature.
It seems to work fine with std::visit but on some compilers (specifically clang for android ndk)
I get undefined references when trying to use functions from one of my type for the variant.
Results in linker error:
error: undefined reference to 'AudioResource::Load() const'
it seems to work for windows.
are there any restrictions on std::variant member functions when trying to use them with std::visit? it seems to be fine when the definition of AudioResource::Load is directly in the header.
@ne555 interesting, I'm using cmake with GLOB recurse. But maybe you're right and something is just fucked up with my project (even though I've did several clean runs), since I haven't really found any restrictions in the variant proposals etc