Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
is_move_assignable.hpp
Go to the documentation of this file.
1// Copyright 2024, Toyota Motor Corporation
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
5#ifndef INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_IS_MOVE_ASSIGNABLE_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_IS_MOVE_ASSIGNABLE_HPP_
7
8// parasoft-begin-suppress CERT_CPP-DCL58-a-2 "Part of a standard library implementation"
9// parasoft-begin-suppress AUTOSAR-A17_6_1-a-2 "Part of a standard library implementation"
10
11// IWYU pragma: private, include <type_traits>
12// IWYU pragma: friend "stdlib_detail/.*"
13
14#include "stdlib/include/stdlib_detail/integral_constant.hpp"
15#include "stdlib/include/stdlib_detail/is_assignable.hpp"
16#include "stdlib/include/stdlib_detail/is_referenceable.hpp"
17
18namespace std {
19
21/// @brief Type trait to detect if an instance of @c T is move assignable
22/// @tparam T The type of the value to check
23template <typename T, bool = internal::is_referenceable_v<T>>
24extern constexpr bool is_move_assignable_v = false;
25
26/// @brief Type trait to detect if an instance of @c T is move assignable
27/// @tparam T The type of the value to check
28template <typename T>
29extern constexpr bool is_move_assignable_v<T, true> = is_assignable_v<T&, T&&>;
30
31/// @brief Type trait to detect if an instance of @c T is move assignable without throwing
32/// @tparam T The type of the value to check
33template <typename T, bool = internal::is_referenceable_v<T>>
34extern constexpr bool is_nothrow_move_assignable_v = false;
35
36/// @brief Type trait to detect if an instance of @c T is move assignable without throwing
37/// @tparam T The type of the value to check
38template <typename T>
39extern constexpr bool is_nothrow_move_assignable_v<T, true> = is_nothrow_assignable_v<T&, T&&>;
40
41/// @brief Type trait to detect if an instance of @c T is trivially move assignable
42/// @tparam T The type of the value to check
43template <typename T, bool = internal::is_referenceable_v<T>>
44extern constexpr bool is_trivially_move_assignable_v = false;
45
46/// @brief Type trait to detect if an instance of @c T is trivially move assignable
47/// @tparam T The type of the value to check
48template <typename T>
49extern constexpr bool is_trivially_move_assignable_v<T, true> = __is_trivially_assignable(T&, T&&);
50} // namespace is_move_assignable_detail
51
52/// @brief Type trait to detect if an instance of @c T is move assignable
53/// @tparam T The type of the value to check
54template <typename T>
56
57/// @brief Type trait to detect if an instance of @c T is move assignable
58/// @tparam T The type of the value to check
59template <typename T>
61
62/// @brief Type trait to detect if an instance of @c T is move assignable without throwing
63/// @tparam T The type of the value to check
64template <typename T>
66
67/// @brief Type trait to detect if an instance of @c T is move assignable without throwing
68/// @tparam T The type of the value to check
69template <typename T>
71
72/// @brief Type trait to detect if an instance of @c T is move assignable without throwing
73/// @tparam T The type of the value to check
74template <typename T>
76
77/// @brief Type trait to detect if an instance of @c T is move assignable without throwing
78/// @tparam T The type of the value to check
79template <typename T>
81
82} // namespace std
83
84#endif // INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_IS_MOVE_ASSIGNABLE_HPP_
Type trait to detect if an instance of T is move assignable.
Definition is_move_assignable.hpp:60
Type trait to detect if an instance of T is move assignable without throwing.
Definition is_move_assignable.hpp:70
Type trait to detect if an instance of T is move assignable without throwing.
Definition is_move_assignable.hpp:80
Definition is_move_assignable.hpp:20
constexpr bool is_move_assignable_v
Type trait to detect if an instance of T is move assignable.
constexpr bool is_trivially_move_assignable_v
Type trait to detect if an instance of T is move assignable without throwing.
constexpr bool is_nothrow_move_assignable_v
Type trait to detect if an instance of T is move assignable without throwing.
constexpr auto operator()(::arene::base::result< void, E > const &value) const noexcept(noexcept(hash< E >{}(std::declval< E const & >()))) -> std::size_t
Calculate the hash of a result.
Definition result.hpp:1827