Skip to content

why it's not possible to serialize c++11 enums directly #513

Description

@ivankarpey

enum class Colors: short{ Red = 0, Green, Blue}

when trying to restore it like

Colors c = json["color"].get<Colors>() it's fails with

tools/libs/json.h:862:17: �[Kerror: static assertion failed: could not find from_json() method in T's namespace

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions