// This file is part of the mcl project. // Copyright (c) 2022 merryhime // SPDX-License-Identifier: MIT #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace mcl::mp; // bit_and static_assert(bit_and, lift_value<1>>::value == 1); // bit_not static_assert(bit_not>::value == ~0); // bit_or static_assert(bit_or, lift_value<3>>::value == 3); // bit_xor static_assert(bit_xor, lift_value<3>>::value == 2); // conjunction static_assert(std::is_same_v, std::true_type>); static_assert(std::is_same_v>, lift_value<0>>); static_assert(std::is_same_v, std::true_type>, std::true_type>); // disjunction static_assert(std::is_same_v, std::true_type>); static_assert(std::is_same_v>, lift_value<0>>); static_assert(std::is_same_v, std::true_type>, lift_value<42>>); // lift_value static_assert(std::is_same_v, std::integral_constant>); static_assert(std::is_same_v, std::false_type>); // logic_and static_assert(std::is_same_v, std::true_type>); static_assert(std::is_same_v, std::true_type>); static_assert(std::is_same_v>, std::true_type>); static_assert(std::is_same_v, std::false_type>); // logic_not static_assert(std::is_same_v, std::true_type>); // logic_or static_assert(std::is_same_v, std::false_type>); static_assert(std::is_same_v, std::true_type>); static_assert(std::is_same_v>, std::false_type>); static_assert(std::is_same_v, std::true_type>); // product static_assert(product, lift_value<2>, lift_value<3>, lift_value<4>>::value == 24); // sum static_assert(sum, lift_value<2>, lift_value<3>, lift_value<4>>::value == 10); // value_cast static_assert(std::is_same_v, std::integral_constant>); // value_equal static_assert(std::is_same_v>, std::true_type>);