Horizon
Loading...
Searching...
No Matches
tagged_tuple.hpp
Go to the documentation of this file.
1
2// Range v3 library
3//
4// Copyright Eric Niebler 2013-present
5//
6// Use, modification and distribution is subject to the
7// Boost Software License, Version 1.0. (See accompanying
8// file LICENSE_1_0.txt or copy at
9// http://www.boost.org/LICENSE_1_0.txt)
10//
11// Project home: https://github.com/ericniebler/range-v3
12
13#ifndef RANGES_V3_UTILITY_TAGGED_TUPLE_HPP
14#define RANGES_V3_UTILITY_TAGGED_TUPLE_HPP
15
16#include <tuple>
17
19
21
22#include <range/v3/detail/prologue.hpp>
23
24RANGES_DIAGNOSTIC_PUSH
25RANGES_DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS
26
27namespace ranges
28{
29 template<typename... Ts>
30 using tagged_tuple RANGES_DEPRECATED("ranges::tagged_tuple is deprecated.") =
31 tagged<std::tuple<detail::tag_elem<Ts>...>, detail::tag_spec<Ts>...>;
32
33 template<typename... Tags, typename... Ts>
34 RANGES_DEPRECATED("ranges::make_tagged_tuple is deprecated.")
35 constexpr tagged_tuple<Tags(bind_element_t<Ts>)...> make_tagged_tuple(Ts &&... ts)
36 {
37 return tagged_tuple<Tags(bind_element_t<Ts>)...>{static_cast<Ts &&>(ts)...};
38 }
39} // namespace ranges
40
41RANGES_DIAGNOSTIC_POP
42
43#include <range/v3/detail/epilogue.hpp>
44
45#endif