If the user is using C++23, then std::expected is available, but reflect-cpp doesn't support serialising it.
I suppose for now I can just write a polyfill for it, but it would be convenient if support was built-in to this library.
I think the simplest implementation can just serialise a std::expected<T, E> as if it was a std::variant<T, E> --let me know if you are aware of any problems with this approach.
If I am successful writing my polyfill, I am prepared to send patches to reflect-cpp for it if integrating it with the library proper is straightforward enough.
If the user is using C++23, then
std::expectedis available, but reflect-cpp doesn't support serialising it.I suppose for now I can just write a polyfill for it, but it would be convenient if support was built-in to this library.
I think the simplest implementation can just serialise a
std::expected<T, E>as if it was astd::variant<T, E>--let me know if you are aware of any problems with this approach.If I am successful writing my polyfill, I am prepared to send patches to reflect-cpp for it if integrating it with the library proper is straightforward enough.