tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
variant_fwd.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_VARIANT_VARIANT_FWD_HPP
4#define TETL_VARIANT_VARIANT_FWD_HPP
5
11
12namespace etl {
13
14template <typename... Types>
15struct variant;
16
17template <typename... Types>
18struct variant;
19
20template <typename T>
22
26template <size_t I, typename T>
28
29template <etl::size_t I, typename... Ts>
30constexpr auto unchecked_get(variant<Ts...>& v) -> auto&;
31
32template <etl::size_t I, typename... Ts>
33constexpr auto unchecked_get(variant<Ts...> const& v) -> auto const&;
34
35template <etl::size_t I, typename... Ts>
36constexpr auto unchecked_get(variant<Ts...>&& v) -> auto&&;
37
38template <etl::size_t I, typename... Ts>
39constexpr auto unchecked_get(variant<Ts...> const&& v) -> auto const&&;
40
41template <typename T, typename... Types>
42constexpr auto get_if(variant<Types...>* pv) noexcept -> add_pointer_t<T>; // NOLINT
43
44template <typename T, typename... Types>
45constexpr auto get_if(variant<Types...> const* pv) noexcept -> add_pointer_t<T const>; // NOLINT
46
47template <size_t I, typename... Types>
48constexpr auto get_if(variant<Types...>* pv) noexcept -> add_pointer_t<typename variant_alternative<
49 I,
50 variant<Types...>>::type>; // NOLINT
51
52template <size_t I, typename... Types>
53constexpr auto get_if(variant<Types...> const* pv) noexcept -> add_pointer_t<typename variant_alternative<
54 I,
55 variant<Types...>>::type const>; // NOLINT
56
57} // namespace etl
58
59#endif // TETL_VARIANT_VARIANT_FWD_HPP
Definition adjacent_find.hpp:8
constexpr auto unchecked_get(variant< Ts... > &v) -> auto &
constexpr auto get_if(variant< Types... > *pv) noexcept -> add_pointer_t< T >
TETL_BUILTIN_SIZET size_t
etl::size_t is the unsigned integer type of the result of the sizeof operator.
Definition size_t.hpp:14
Provides compile-time indexed access to the types of the alternatives of the possibly cv-qualified va...
Definition variant_fwd.hpp:27
Definition variant_fwd.hpp:21
Definition variant.hpp:98