github_112.cpp 679 B

1234567891011121314151617181920212223242526272829
  1. // Copyright Louis Dionne 2013-2017
  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. #include <boost/hana/accessors.hpp>
  5. #include <boost/hana/adapt_struct.hpp>
  6. #include <boost/hana/define_struct.hpp>
  7. namespace hana = boost::hana;
  8. struct Person {
  9. BOOST_HANA_DEFINE_STRUCT(Person,
  10. (int, age)
  11. );
  12. };
  13. struct Employee {
  14. int age;
  15. };
  16. BOOST_HANA_ADAPT_STRUCT(Employee, age);
  17. constexpr auto person_members = hana::accessors<Person>();
  18. constexpr auto employee_members = hana::accessors<Employee>();
  19. int main() {
  20. (void)person_members;
  21. (void)employee_members;
  22. }