tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
decay_copy.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2// SPDX-FileCopyrightText: Copyright (C) 2021 Tobias Hienzsch
3
4#ifndef TETL_RANGES_DECAY_COPY_HPP
5#define TETL_RANGES_DECAY_COPY_HPP
6
7#include <etl/_type_traits/decay.hpp>
8#include <etl/_type_traits/is_nothrow_convertible.hpp>
9#include <etl/_utility/forward.hpp>
10
11namespace etl {
12
13/// \ingroup ranges
14template <typename T>
15constexpr auto decay_copy(T&& t) noexcept(is_nothrow_convertible_v<T, decay_t<T>>) -> decay_t<T>
16{
17 return etl::forward<T>(t);
18}
19
20} // namespace etl
21
22#endif // TETL_RANGES_DECAY_COPY_HPP
constexpr auto decay_copy(T &&t) noexcept(is_nothrow_convertible_v< T, decay_t< T > >) -> decay_t< T >
Definition decay_copy.hpp:15
Definition adjacent_find.hpp:9