The problem is that normal std::variant in C++ library for host uses a vtable which is not supported on device.
So, you need a specific implementation of std::variant idea or similar that does not use vtable or RTTI.
The problem is that normal std::variant in C++ library for host uses a vtable which is not supported on device.
So, you need a specific implementation of std::variant idea or similar that does not use vtable or RTTI.