| 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 | |
| 5 | #ifndef BOOST_HASH_IS_DESCRIBED_CLASS_HPP_INCLUDED |
| 6 | #define BOOST_HASH_IS_DESCRIBED_CLASS_HPP_INCLUDED |
| 7 | |
| 8 | #include <boost/type_traits/integral_constant.hpp> |
| 9 | #include <boost/type_traits/is_union.hpp> |
| 10 | #include <boost/describe/bases.hpp> |
| 11 | #include <boost/describe/members.hpp> |
| 12 | |
| 13 | namespace boost |
| 14 | { |
| 15 | namespace container_hash |
| 16 | { |
| 17 | |
| 18 | #if defined(BOOST_DESCRIBE_CXX11) |
| 19 | |
| 20 | template<class T> struct is_described_class: boost::integral_constant<bool, |
| 21 | describe::has_describe_bases<T>::value && |
| 22 | describe::has_describe_members<T>::value && |
| 23 | !boost::is_union<T>::value> |
| 24 | { |
| 25 | }; |
| 26 | |
| 27 | #else |
| 28 | |
| 29 | template<class T> struct is_described_class: boost::false_type |
| 30 | { |
| 31 | }; |
| 32 | |
| 33 | #endif |
| 34 | |
| 35 | } // namespace container_hash |
| 36 | } // namespace boost |
| 37 | |
| 38 | #endif // #ifndef BOOST_HASH_IS_DESCRIBED_CLASS_HPP_INCLUDED |
| 39 |