From 0ca69d98c9728ef98a4efe23d3d1c19969a426f1 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 23 Aug 2019 20:51:13 +0300 Subject: [PATCH] Add test/mpl_tuple.cpp --- test/Jamfile | 1 + test/mpl_tuple.cpp | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 test/mpl_tuple.cpp diff --git a/test/Jamfile b/test/Jamfile index 3036d94..e2df961 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -192,6 +192,7 @@ run mp_bind_back.cpp ; # mpl run mpl.cpp : ; run mpl_list.cpp : ; +run mpl_tuple.cpp : ; # version run version.cpp ; diff --git a/test/mpl_tuple.cpp b/test/mpl_tuple.cpp new file mode 100644 index 0000000..d85c36c --- /dev/null +++ b/test/mpl_tuple.cpp @@ -0,0 +1,36 @@ + +// Copyright 2017, 2019 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + + +#include +#include + +#include +#include + +#include + +int main() +{ + namespace mpl = boost::mpl; + using namespace boost::mp11; + + using L1 = std::tuple; + + BOOST_TEST_TRAIT_TRUE((std::is_same>::type, mp_at_c>)); + BOOST_TEST_TRAIT_TRUE((std::is_same>::type, mp_at_c>)); + BOOST_TEST_TRAIT_TRUE((std::is_same>::type, mp_at_c>)); + + BOOST_TEST_TRAIT_TRUE((std::is_same::type, mp_at_c>)); + BOOST_TEST_TRAIT_TRUE((std::is_same::type, mp_at_c>)); + BOOST_TEST_TRAIT_TRUE((std::is_same::type, mp_at_c>)); + + BOOST_TEST_EQ((mpl::size::type::value), mp_size::value); + + return boost::report_errors(); +}