We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support unknown
struct person : struct_pb::base_impl<person> { int age; std::string name; }; struct person2 : struct_pb::base_impl<person2> { int age; std::string name; int salary; }; REFLECTION(person, age, name); REFLECTION(person2, age, name, salary); int main() { person p1{}; p1.age = 100; p1.name = "abc"; std::string s; struct_pb::to_pb(p1, s); person2 p2{}; struct_pb::from_pb(p2, s); std::cout << p2.age << std::endl; std::cout << p2.name << std::endl; std::cout << p2.salary << std::endl; p2.salary = 1000; struct_pb::to_pb(p2, s); person p3{}; struct_pb::from_pb(p3, s); std::cout << p3.age << std::endl; std::cout << p3.name << std::endl; return 0; }
got error
100 abc 0 libc++abi: terminating due to uncaught exception of type std::out_of_range: unknown key
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Search before asking
What happened + What you expected to happen
support unknown
Reproduction way
got error
Anything else
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: