| 1 | // Copyright Louis Dionne 2013-2022 |
| 2 | // Distributed under the Boost Software License, Version 1.0. |
| 3 | // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) |
| 4 | |
| 5 | #include <boost/hana/assert.hpp> |
| 6 | #include <boost/hana/map.hpp> |
| 7 | #include <boost/hana/symmetric_difference.hpp> |
| 8 | |
| 9 | namespace hana = boost::hana; |
| 10 | |
| 11 | |
| 12 | constexpr auto m1 = hana::make_map( |
| 13 | hana::make_pair(hana::type_c<int>, 1), |
| 14 | hana::make_pair(hana::type_c<bool>, hana::true_c) |
| 15 | ); |
| 16 | |
| 17 | constexpr auto m2 = hana::make_map( |
| 18 | hana::make_pair(hana::type_c<float>, 1.0), |
| 19 | hana::make_pair(hana::type_c<long long>, 2LL), |
| 20 | hana::make_pair(hana::type_c<int>, 3) |
| 21 | ); |
| 22 | |
| 23 | constexpr auto result_m = hana::make_map( |
| 24 | hana::make_pair(hana::type_c<bool>, hana::true_c), |
| 25 | hana::make_pair(hana::type_c<float>, 1.0), |
| 26 | hana::make_pair(hana::type_c<long long>, 2LL) |
| 27 | ); |
| 28 | |
| 29 | int main() { |
| 30 | BOOST_HANA_RUNTIME_CHECK( |
| 31 | hana::symmetric_difference(m1, m2) == result_m |
| 32 | ); |
| 33 | } |
| 34 | |