jharmer95 / rpc.hpp

A simple header-only library for supporting remote procedure calls using a variety of extensible features
BSD 3-Clause "New" or "Revised" License
4 stars 2 forks source link

[FEATURE REQUEST] Support std::optional, std::variant, and std::reference_wrapper #84

Closed jharmer95 closed 1 year ago

jharmer95 commented 2 years ago

Feature Request: Support std::optional, std::variant, and std::reference_wrapper

Brief Summary of Request

std::optional, std::variant, and std::reference_wrapper are common standard library types that should be somewhat trivial to serialize

What Is The Value Added With This Feature

Possible Implementation

Desired Outcome

// server
std::optional<std::string> Lookup(size_t key);

// client
auto result = client.template call_func<std::optional<std::string>>("Lookup", 241);

if (result.has_value())
{
    // ...
}
jharmer95 commented 2 years ago

Added support for std::optional. std::variant, and std::reference_wrapper require some more tricky work

jharmer95 commented 1 year ago