mirror of
https://github.com/boostorg/mp11.git
synced 2025-12-04 07:49:20 +01:00
Test mp_fold and mp_reverse_fold with std::pair. Refs #108.
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
|
||||
// Copyright 2015-2017 Peter Dimov.
|
||||
//
|
||||
// Copyright 2015-2017, 2025 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
|
||||
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/mp11/algorithm.hpp>
|
||||
#include <boost/mp11/list.hpp>
|
||||
@@ -14,6 +9,7 @@
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <type_traits>
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
|
||||
struct X1 {};
|
||||
struct X2 {};
|
||||
@@ -46,6 +42,10 @@ int main()
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_reverse_fold_q<std::tuple<X1, X2, X3, X4>, void, Q>, F<X1, F<X2, F<X3, F<X4, void>>>>>));
|
||||
}
|
||||
|
||||
{
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_reverse_fold_q<std::pair<X1, X2>, void, Q>, F<X1, F<X2, void>>>));
|
||||
}
|
||||
|
||||
using boost::mp11::mp_bind;
|
||||
using boost::mp11::_1;
|
||||
using boost::mp11::_2;
|
||||
|
||||
Reference in New Issue
Block a user