Cuberite
A lightweight, fast and extensible game server for Minecraft
|
You can use this struct to use in std::visit example: std::visit( OverloadedVariantAccess { [&] (cFirstType & a_FirstTypeObject) { // Your code to handle cFirstType }, [&] (cSecondType & a_SecondTypeObject) { // YourCode to handle cSecondType }, ... More...
#include <Globals.h>
You can use this struct to use in std::visit example: std::visit( OverloadedVariantAccess { [&] (cFirstType & a_FirstTypeObject) { // Your code to handle cFirstType }, [&] (cSecondType & a_SecondTypeObject) { // YourCode to handle cSecondType }, ...
} , YourVariant); You can use constant references if you want to.