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