Is there a way to use the BOOST_HANA_ADAPT_STRUCT macro for a struct that inherits from a base struct without repeating the accessors of the base struct ?
Right now I have something similar to the following example:
namespace hana = boost::hana;
namespace ns {
struct Person {
std::string name;
int age;
};
}
BOOST_HANA_ADAPT_STRUCT(ns::Person,
name,
age
);
namespace ns {
struct Employer : Person {
std::string company;
};
}
BOOST_HANA_ADAPT_STRUCT(ns::Employer,
name, // duplication
age, // duplication
company
);