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
Hi
I have a code like this:
const auto objView = rfl::to_view(obj); const auto process = []<class... F>(F... _field) { ... }; std::apply(process, objView.fields());
but after #160 it stopped working with:
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/utility.h:75:44: error: implicit instantiation of undefined template 'std::tuple_size<rfl::Tuple<rfl::Field<internal::StringLiteral<8>{{"abc_vec"}}, const std::vector<ABC> *>, rfl::Field<internal::StringLiteral<10>{{"abc_deque"}}, const std::deque<ABC> *>>>' 75 | inline constexpr size_t tuple_size_v = tuple_size<_Tp>::value; | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/tuple:2935:24: note: in instantiation of variable template specialization 'std::tuple_size_v<rfl::Tuple<rfl::Field<internal::StringLiteral<8>{{"abc_vec"}}, const std::vector<ABC> *>, rfl::Field<internal::StringLiteral<10>{{"abc_deque"}}, const std::deque<ABC> *>>>' requested here 2935 | = make_index_sequence<tuple_size_v<remove_reference_t<_Tuple>>>; | ^ /home/michal/projects/sources/broom/src/core/json_serializer.hpp:100:22: note: in instantiation of function template specialization 'std::apply<const (lambda at /home/michal/projects/sources/broom/src/core/json_serializer.hpp:96:38) &, rfl::Tuple<rfl::Field<internal::StringLiteral<8>{{"abc_vec"}}, const std::vector<ABC> *>, rfl::Field<internal::StringLiteral<10>{{"abc_deque"}}, const std::deque<ABC> *>>>' requested here 100 | std::apply(process, objView.fields()); | ^ /home/michal/projects/sources/broom/src/core/json_serializer.hpp:179:36: note: in instantiation of function template specialization 'JSon::impl::serialize<DEF>' requested here 179 | const auto jsonObj = impl::serialize(obj); | ^ /home/michal/projects/sources/broom/src/core/unit_tests/json_serializer_tests.cpp:89:38: note: in instantiation of function template specialization 'JSon::serialize<DEF>' requested here 89 | const QJsonDocument json = JSon::serialize(def); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/utility.h:49:12: note: template is declared here 49 | struct tuple_size; | ^
Should I implement it differently now?
The text was updated successfully, but these errors were encountered:
For performance reasons, we replaced std::tuple with our own implementation, rfl::Tuple.
You can just replace std::apply with rfl::apply.
Sorry, something went wrong.
No branches or pull requests
Hi
I have a code like this:
but after #160 it stopped working with:
Should I implement it differently now?
The text was updated successfully, but these errors were encountered: