]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/beast/test/beast/core/_detail_tuple.cpp
2 // Copyright (c) 2016-2019Damian Jarek (damian dot jarek93 at gmail dot com)
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 // Official repository: https://github.com/boostorg/beast
10 // Test that header file is self-contained.
11 #include <boost/beast/core/detail/tuple.hpp>
13 #include <boost/beast/_experimental/unit_test/suite.hpp>
19 class tuple_test
: public beast::unit_test::suite
25 struct explicit_constructible
27 explicit_constructible(std::nullptr_t
)
32 explicit explicit_constructible(int i
)
40 tuple
<explicit_constructible
, int> t
{nullptr, 42};
41 BEAST_EXPECT(detail::get
<1>(t
) == 42);
42 BEAST_EXPECT(detail::get
<0>(t
).i_
== 0);
44 t
= tuple
<explicit_constructible
, int>{explicit_constructible(42), 43};
45 BEAST_EXPECT(detail::get
<1>(t
) == 43);
46 BEAST_EXPECT(detail::get
<0>(t
).i_
== 42);
50 BEAST_DEFINE_TESTSUITE(beast
,core
,tuple
);