Skip to content

iguana支持匿名类么?该如何写 #644

@171930433

Description

@171930433
struct AS
{
struct IAS{
double y;
};

REFLECTION(IAS,y);

double x;
IAS x2;
};

REFLECTION(AS,x,x2);

int main() {

  AS a;
  std::string str;
  iguana::to_json(a,str);

  std::cout << str <<"\n";

  return 0;
}

编译失败:
no matching function for call to ‘to_json_impl(std::__cxx11::basic_string&, AS::IAS&)’

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions