diff options
Diffstat (limited to 'src/boost/libs/hana/example/ext/boost/mpl/vector/iterable.cpp')
-rw-r--r-- | src/boost/libs/hana/example/ext/boost/mpl/vector/iterable.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/boost/libs/hana/example/ext/boost/mpl/vector/iterable.cpp b/src/boost/libs/hana/example/ext/boost/mpl/vector/iterable.cpp new file mode 100644 index 000000000..c6751a3b7 --- /dev/null +++ b/src/boost/libs/hana/example/ext/boost/mpl/vector/iterable.cpp @@ -0,0 +1,33 @@ +// Copyright Louis Dionne 2013-2017 +// 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/assert.hpp> +#include <boost/hana/drop_front.hpp> +#include <boost/hana/drop_while.hpp> +#include <boost/hana/equal.hpp> +#include <boost/hana/ext/boost/mpl/vector.hpp> +#include <boost/hana/ext/std/integral_constant.hpp> +#include <boost/hana/front.hpp> +#include <boost/hana/type.hpp> + +#include <boost/mpl/vector.hpp> +#include <type_traits> +namespace hana = boost::hana; +namespace mpl = boost::mpl; + + +BOOST_HANA_CONSTANT_CHECK(hana::front(mpl::vector<int, char, void>{}) == hana::type_c<int>); + +BOOST_HANA_CONSTANT_CHECK(hana::equal( + hana::drop_front(mpl::vector<int, char, void>{}), + mpl::vector<char, void>{} +)); + +BOOST_HANA_CONSTANT_CHECK(hana::equal( + hana::drop_while(mpl::vector<float, double const, int, float&>{}, + hana::trait<std::is_floating_point>), + mpl::vector<int, float&>{} +)); + +int main() { } |