tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
move_if_noexcept.hpp
Go to the documentation of this file.
1
2
3// SPDX-License-Identifier: BSL-1.0
4
5#ifndef TETL_UTILITY_MOVE_IF_NOEXCEPT_HPP
6#define TETL_UTILITY_MOVE_IF_NOEXCEPT_HPP
7
11#include <etl/_utility/move.hpp>
12
13namespace etl {
14
19template <typename T>
20[[nodiscard]] constexpr auto move_if_noexcept(T& x) noexcept
22{
23 return etl::move(x);
24}
25
26} // namespace etl
27
28#endif // TETL_UTILITY_MOVE_IF_NOEXCEPT_HPP
constexpr auto move(InputIt first, InputIt last, OutputIt destination) -> OutputIt
Moves the elements in the range [first, last), to another range beginning at destination,...
Definition move.hpp:26
Definition adjacent_find.hpp:8
constexpr bool is_copy_constructible_v
Definition is_copy_constructible.hpp:30
typename conditional< B, T, F >::type conditional_t
Definition conditional.hpp:21
constexpr auto move_if_noexcept(T &x) noexcept -> etl::conditional_t<!etl::is_nothrow_move_constructible_v< T > and etl::is_copy_constructible_v< T >, T const &, T && >
Conditionally convert a value to an rvalue.
Definition move_if_noexcept.hpp:20