Skip to content

how use template <typename T> struct adl_serializer  #2035

@wuvalue

Description

@wuvalue

template
struct adl_serializer {
static void to_json(json& j, const T& value) {
// calls the "to_json" method in T's namespace
}

static void from_json(const json& j, T& value) {
    // same thing, but with the "from_json" method
}

};

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions