Can we replace the argument type to variant ?
template <typename ...T >
struct User
{
using ArgType = std::variant<T...>;
virtual void Send_Data(const ArgType& Data) const
{
std::visit([](auto x) { std::cout << "Send " << x << "\n"; }, Data);
};
virtual void Receive_Data(const ArgType& Data) const
{
std::visit([](auto x) { std::cout << "Receive " << x << "\n"; }, Data);
}
};