| 1 | // Copyright Louis Dionne 2013-2022 |
|---|---|
| 2 | // Distributed under the Boost Software License, Version 1.0. |
| 3 | // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) |
| 4 | |
| 5 | #include <boost/hana/accessors.hpp> |
| 6 | #include <boost/hana/adapt_struct.hpp> |
| 7 | #include <boost/hana/define_struct.hpp> |
| 8 | namespace hana = boost::hana; |
| 9 | |
| 10 | |
| 11 | struct Person { |
| 12 | BOOST_HANA_DEFINE_STRUCT(Person, |
| 13 | (int, age) |
| 14 | ); |
| 15 | }; |
| 16 | |
| 17 | struct Employee { |
| 18 | int age; |
| 19 | }; |
| 20 | |
| 21 | BOOST_HANA_ADAPT_STRUCT(Employee, age); |
| 22 | |
| 23 | constexpr auto person_members = hana::accessors<Person>(); |
| 24 | constexpr auto employee_members = hana::accessors<Employee>(); |
| 25 | |
| 26 | int main() { |
| 27 | (void)person_members; |
| 28 | (void)employee_members; |
| 29 | } |
| 30 |
