Skip to content

when using assign operator in with json object a static assertion fails.. #1055

@jipr311

Description

@jipr311

Bug Report
suppose you have the following class:

class Point{
public:
Point();
private:
int x;
int y;
}

then if you create a point:

Point p { 100, 100 };

and do

json j = p;

then you get the error:

static assertion failed: could not find to_json() method in T's namespace
         static_assert(sizeof(BasicJsonType) == 0,
         ^

that is pretty st.forward, what is the reason of the failure?
Feature Request

  • Describe the feature in as much detail as possible.

  • Include sample usage where appropriate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    solution: proposed fixa fix for the issue has been proposed and waits for confirmation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions