tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
ignore.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2// SPDX-FileCopyrightText: Copyright (C) 2019 Tobias Hienzsch
3
4#ifndef TETL_TUPLE_IGNORE_HPP
5#define TETL_TUPLE_IGNORE_HPP
6
7namespace etl {
8
9/// \brief An object of unspecified type such that any value can be assigned to
10/// it with no effect. Intended for use with etl::tie when unpacking a
11/// etl::tuple, as a placeholder for the arguments that are not used.
12inline constexpr struct ignore {
13 template <typename T>
14 constexpr auto operator=(T const& /*unused*/) const -> auto const&
15 {
16 return *this;
17 }
18} ignore;
19
20} // namespace etl
21
22#endif // TETL_TUPLE_IGNORE_HPP
Definition adjacent_find.hpp:9
An object of unspecified type such that any value can be assigned to it with no effect....
Definition ignore.hpp:12
constexpr auto operator=(T const &) const -> auto const &
Definition ignore.hpp:14