I’ve run into a bit of a snag while trying to integrate Nakama with another SDK I’d like to use. The problem is the other SDK makes use of std::optional.
Nakama uses a third party library called optional-lite. This library requires special consideration. In the github description it says “If available, std::optional is used.”
While this might seem to be convenient, this feature of optional-lite breaks Nakama functions with optional parameters in environments where std::optional is present.
For example, an environment that is shared with my other SDK. The result is that authenticateDevice() calls std::optional instead of nonstd::optional to process optional parameters. This leads to problems when trying to assemble those parameters into a POST request to the server. For me it’s manifesting as a “bad allocation” error.
Is it possible to use Nakama in an environment where std::optional is available? How can I over-ride this feature of optional-lite in the context of a Nakama build?
Thanks for any input.