1 #ifndef REFLECTIVE_RAPIDJSON_BINARY_REFLECTOR_BOOST_HANA_H 2 #define REFLECTIVE_RAPIDJSON_BINARY_REFLECTOR_BOOST_HANA_H 17 #include <boost/hana/adapt_struct.hpp> 18 #include <boost/hana/at_key.hpp> 19 #include <boost/hana/define_struct.hpp> 20 #include <boost/hana/for_each.hpp> 21 #include <boost/hana/intersection.hpp> 22 #include <boost/hana/keys.hpp> 25 namespace BinaryReflector {
29 boost::hana::for_each(
30 boost::hana::keys(customType), [&deserializer, &customType](
auto key) { deserializer.
read(boost::hana::at_key(customType, key)); });
35 boost::hana::for_each(
36 boost::hana::keys(customType), [&serializer, &customType](
auto key) { serializer.
write(boost::hana::at_key(customType, key)); });
42 #endif // REFLECTIVE_RAPIDJSON_BINARY_REFLECTOR_BOOST_HANA_H
void writeCustomType(BinarySerializer &serializer, const Type &customType)
void write(const Type &pair)
void readCustomType(BinaryDeserializer &deserializer, Type &customType)