When I make trait for type with static memder of standard type (int, double, etc.) it works fine. When I make trait for type1 with static memder of non-standard type2 (my own class), even I previously make traits for type2, making trait fore type1 does not work.
A minimal compilable example of that features the bug.
main.cpp
include
include <ThorSerialize/JsonThor.h>
include <ThorSerialize/SerUtil.h>
struct Type1
{
int a;
};
struct Type2
{
static int b;
static Type1 c;
};
When I make trait for type with static memder of standard type (int, double, etc.) it works fine. When I make trait for type1 with static memder of non-standard type2 (my own class), even I previously make traits for type2, making trait fore type1 does not work.
main.cpp
include
include <ThorSerialize/JsonThor.h>
include <ThorSerialize/SerUtil.h>
struct Type1 { int a; }; struct Type2 { static int b; static Type1 c; };
ThorsAnvil_MakeTrait(Type1, a); ThorsAnvil_MakeTrait(Type2, b, c);
using ThorsAnvil::Serialize::jsonExport; using ThorsAnvil::Serialize::jsonImport; int main(int argc, char* argv[]) { std::fstream fileStream; Type2 entity; fileStream >> jsonImport(entity); fileStream << jsonExport(entity); return 0; }
Expected behavior
Environment:
OS:
Compiler and Version
Additional context