| 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 | #include <boost/container_hash/is_described_class.hpp> |
| 6 | #include <boost/describe/class.hpp> |
| 7 | #include <boost/core/lightweight_test_trait.hpp> |
| 8 | |
| 9 | union Y1 |
| 10 | { |
| 11 | }; |
| 12 | |
| 13 | BOOST_DESCRIBE_STRUCT( Y1, (), () ) |
| 14 | |
| 15 | union Y2 |
| 16 | { |
| 17 | int m1; |
| 18 | float m2; |
| 19 | }; |
| 20 | |
| 21 | BOOST_DESCRIBE_STRUCT( Y2, (), (m1, m2) ) |
| 22 | |
| 23 | int main() |
| 24 | { |
| 25 | using boost::container_hash::is_described_class; |
| 26 | |
| 27 | BOOST_TEST_TRAIT_FALSE((is_described_class<Y1>)); |
| 28 | BOOST_TEST_TRAIT_FALSE((is_described_class<Y2>)); |
| 29 | |
| 30 | return boost::report_errors(); |
| 31 | } |
| 32 |
