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/map.hpp>
6
7#include <laws/base.hpp>
8#include <support/minimal_product.hpp>
9#include <type_traits>
10#include <utility>
11namespace hana = boost::hana;
12
13
14template <typename ...Pairs>
15struct check_map {
16 static_assert(std::is_same<
17 hana::map<Pairs...>,
18 decltype(hana::make_map(std::declval<Pairs>()...))
19 >{}, "");
20};
21
22template <int i>
23using pair = ::product_t<hana::test::ct_eq<i>, hana::test::ct_eq<-i>>;
24
25template struct check_map<>;
26template struct check_map<pair<1>>;
27template struct check_map<pair<1>, pair<2>>;
28template struct check_map<pair<1>, pair<2>, pair<3>>;
29template struct check_map<pair<1>, pair<2>, pair<3>, pair<4>>;
30template struct check_map<pair<1>, pair<2>, pair<3>, pair<4>, pair<5>>;
31template struct check_map<pair<1>, pair<2>, pair<3>, pair<4>, pair<5>, pair<6>>;
32
33int main() { }
34

source code of boost/libs/hana/test/map/map.cpp