Skip to content

Support serialising std::expected #716

Description

@saxbophone

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions