core_name.hpp 913 B

1234567891011121314151617181920212223242526272829
  1. // Copyright (c) 2023 Bela Schaum, X-Ryl669, Denis Mikhailov.
  2. //
  3. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. // Initial implementation by Bela Schaum, https://github.com/schaumb
  6. // The way to make it union and UB free by X-Ryl669, https://github.com/X-Ryl669
  7. //
  8. #ifndef BOOST_PFR_DETAIL_CORE_NAME_HPP
  9. #define BOOST_PFR_DETAIL_CORE_NAME_HPP
  10. #pragma once
  11. #include <boost/pfr/detail/config.hpp>
  12. // Each core_name provides `boost::pfr::detail::get_name` and
  13. // `boost::pfr::detail::tie_as_names_tuple` functions.
  14. //
  15. // The whole functional of extracting field's names is build on top of those
  16. // two functions.
  17. #if BOOST_PFR_CORE_NAME_ENABLED
  18. #include <boost/pfr/detail/core_name20_static.hpp>
  19. #else
  20. #include <boost/pfr/detail/core_name14_disabled.hpp>
  21. #endif
  22. #endif // BOOST_PFR_DETAIL_CORE_NAME_HPP