/* @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 #include #include "minimal_logical.hpp" using namespace boost::hana; constexpr struct { } invalid{}; int main() { BOOST_HANA_STATIC_ASSERT(and_()); BOOST_HANA_STATIC_ASSERT(and_(logical)); BOOST_HANA_STATIC_ASSERT(!and_(logical)); BOOST_HANA_STATIC_ASSERT(and_(logical, logical)); BOOST_HANA_STATIC_ASSERT(!and_(logical, logical)); // BOOST_HANA_STATIC_ASSERT(!and_(logical, invalid)); BOOST_HANA_STATIC_ASSERT(and_(logical, logical, logical)); BOOST_HANA_STATIC_ASSERT(!and_(logical, logical, logical)); BOOST_HANA_STATIC_ASSERT(!and_(logical, logical, invalid)); // BOOST_HANA_STATIC_ASSERT(!and_(logical, invalid, invalid)); // operators using operators::operator&&; BOOST_HANA_STATIC_ASSERT((logical && logical) == and_(logical, logical)); BOOST_HANA_STATIC_ASSERT((logical && logical) == and_(logical, logical)); BOOST_HANA_STATIC_ASSERT((logical && logical) == and_(logical, logical)); BOOST_HANA_STATIC_ASSERT((logical && logical) == and_(logical, logical)); }