/* @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 #include #include using namespace boost::hana; int main() { BOOST_HANA_CONSTEXPR_ASSERT(type() == int{}); BOOST_HANA_CONSTEXPR_ASSERT(type(2) == int{2}); BOOST_HANA_CONSTEXPR_ASSERT(type(2.42f) == float{2.42}); BOOST_HANA_CONSTEXPR_ASSERT(type(2.42) == double{2.42}); BOOST_HANA_CONSTEXPR_ASSERT(type(2.2f) == double{2.2f}); BOOST_HANA_CONSTEXPR_ASSERT(type(2.2) == float{2.2}); BOOST_HANA_RUNTIME_ASSERT(type>(std::initializer_list{1, 2, 3}) == std::vector{1, 2, 3}); BOOST_HANA_RUNTIME_ASSERT(type>(1, '2') == std::make_pair(1, '2')); }