is_described_class.hpp 816 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2022 Peter Dimov.
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // https://www.boost.org/LICENSE_1_0.txt
  4. #ifndef BOOST_HASH_IS_DESCRIBED_CLASS_HPP_INCLUDED
  5. #define BOOST_HASH_IS_DESCRIBED_CLASS_HPP_INCLUDED
  6. #include <boost/describe/bases.hpp>
  7. #include <boost/describe/members.hpp>
  8. #include <type_traits>
  9. namespace boost
  10. {
  11. namespace container_hash
  12. {
  13. #if defined(BOOST_DESCRIBE_CXX11)
  14. template<class T> struct is_described_class: std::integral_constant<bool,
  15. describe::has_describe_bases<T>::value &&
  16. describe::has_describe_members<T>::value &&
  17. !std::is_union<T>::value>
  18. {
  19. };
  20. #else
  21. template<class T> struct is_described_class: std::false_type
  22. {
  23. };
  24. #endif
  25. } // namespace container_hash
  26. } // namespace boost
  27. #endif // #ifndef BOOST_HASH_IS_DESCRIBED_CLASS_HPP_INCLUDED