2
0
mirror of https://github.com/boostorg/hana.git synced 2026-02-22 15:32:11 +00:00
Files
hana/test/logical/not.cpp
2014-07-16 16:26:23 -04:00

28 lines
763 B
C++

/*
@copyright Louis Dionne 2014
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#include <boost/hana/logical/mcd.hpp>
#include <boost/hana/detail/minimal/logical.hpp>
#include <boost/hana/detail/static_assert.hpp>
using namespace boost::hana;
template <typename mcd>
void test() {
constexpr auto logical = detail::minimal::logical<mcd>;
BOOST_HANA_STATIC_ASSERT(not_(logical(true)) == logical(false));
BOOST_HANA_STATIC_ASSERT(not_(logical(false)) == logical(true));
BOOST_HANA_STATIC_ASSERT(!logical(true) == not_(logical(true)));
BOOST_HANA_STATIC_ASSERT(!logical(false) == not_(logical(false)));
}
int main() {
test<Logical::mcd>();
}