]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/mp11/test/mp_map_find_3.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / mp11 / test / mp_map_find_3.cpp
CommitLineData
20effc67
TL
1
2// Copyright 2016, 2020 Peter Dimov.
3//
4// Distributed under the Boost Software License, Version 1.0.
5//
6// See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt
8
9// Same as mp_map_find_2.cpp, but with includes reversed
10
11#include <tuple>
12#include <boost/mp11/map.hpp>
13#include <boost/core/lightweight_test_trait.hpp>
14
15struct X {};
16struct Y {};
17
18int main()
19{
20 using boost::mp11::mp_map_find;
21
22 using L1 = std::tuple<std::tuple<int, int>, std::tuple<long, long>, std::tuple<bool, X>, std::tuple<X, bool>>;
23
24 BOOST_TEST_TRAIT_SAME( mp_map_find<L1, int>, std::tuple<int, int> );
25 BOOST_TEST_TRAIT_SAME( mp_map_find<L1, bool>, std::tuple<bool, X> );
26 BOOST_TEST_TRAIT_SAME( mp_map_find<L1, X>, std::tuple<X, bool> );
27
28 using L2 = std::tuple<std::tuple<X, Y>, std::tuple<Y, X>>;
29
30 BOOST_TEST_TRAIT_SAME( mp_map_find<L2, X>, std::tuple<X, Y> );
31 BOOST_TEST_TRAIT_SAME( mp_map_find<L2, Y>, std::tuple<Y, X> );
32
33 return boost::report_errors();
34}