3 Forward declares `boost::hana::basic_tuple`.
5 @copyright Louis Dionne 2013-2016
6 Distributed under the Boost Software License, Version 1.0.
7 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
10 #ifndef BOOST_HANA_FWD_BASIC_TUPLE_HPP
11 #define BOOST_HANA_FWD_BASIC_TUPLE_HPP
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/fwd/core/make.hpp>
17 BOOST_HANA_NAMESPACE_BEGIN
18 //! @ingroup group-datatypes
19 //! Stripped down version of `hana::tuple`.
21 //! Whereas `hana::tuple` aims to provide an interface somewhat close to a
22 //! `std::tuple`, `basic_tuple` provides the strict minimum required to
23 //! implement a closure with maximum compile-time efficiency.
28 //! `Sequence`, and all the concepts it refines
29 template <typename ...Xs>
32 //! Tag representing `hana::basic_tuple`.
33 //! @relates hana::basic_tuple
34 struct basic_tuple_tag { };
36 #ifdef BOOST_HANA_DOXYGEN_INVOKED
37 //! Function object for creating a `basic_tuple`.
38 //! @relates hana::basic_tuple
40 //! Given zero or more objects `xs...`, `make<basic_tuple_tag>` returns a
41 //! new `basic_tuple` containing those objects. The elements are held by
42 //! value inside the resulting tuple, and they are hence copied or moved
43 //! in. This is analogous to `std::make_tuple` for creating `basic_tuple`s.
48 //! @include example/basic_tuple/make.cpp
50 constexpr auto make<basic_tuple_tag> = [](auto&& ...xs) {
51 return basic_tuple<std::decay_t<decltype(xs)>...>{forwarded(xs)...};
55 //! Alias to `make<basic_tuple_tag>`; provided for convenience.
56 //! @relates hana::basic_tuple
61 //! @include example/basic_tuple/make.cpp
62 constexpr auto make_basic_tuple = make<basic_tuple_tag>;
63 BOOST_HANA_NAMESPACE_END
65 #endif // !BOOST_HANA_FWD_BASIC_TUPLE_HPP