]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/monoid.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / hana / test / monoid.cpp
1 // Copyright Louis Dionne 2013-2017
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/concept/monoid.hpp>
7 #include <boost/hana/plus.hpp>
8 #include <boost/hana/tuple.hpp>
9 #include <boost/hana/zero.hpp>
10
11 #include <laws/monoid.hpp>
12 namespace hana = boost::hana;
13
14
15 int main() {
16 hana::test::TestMonoid<int>{hana::make_tuple(0,1,2,3,4,5)};
17 hana::test::TestMonoid<unsigned int>{hana::make_tuple(0u,1u,2u,3u,4u,5u)};
18 hana::test::TestMonoid<long>{hana::make_tuple(0l,1l,2l,3l,4l,5l)};
19 hana::test::TestMonoid<unsigned long>{hana::make_tuple(0ul,1ul,2ul,3ul,4ul,5ul)};
20
21 // zero
22 static_assert(hana::zero<int>() == 0, "");
23
24 // plus
25 static_assert(hana::plus(6, 4) == 6 + 4, "");
26 }