Phi
is_nothrow_swappable.hpp
1 #ifndef INCG_PHI_CORE_TYPE_TRAITS_IS_NOTHROW_SWAPPABLE_HPP
2 #define INCG_PHI_CORE_TYPE_TRAITS_IS_NOTHROW_SWAPPABLE_HPP
3 
4 #include "phi/phi_config.hpp"
5 
6 #if PHI_HAS_EXTENSION_PRAGMA_ONCE()
7 # pragma once
8 #endif
9 
10 #include "phi/compiler_support/constexpr.hpp"
11 #include "phi/compiler_support/inline_variables.hpp"
12 #include "phi/type_traits/add_lvalue_reference.hpp"
13 #include "phi/type_traits/conditional.hpp"
14 #include "phi/type_traits/integral_constant.hpp"
15 #include "phi/type_traits/is_nothrow_swappable_with.hpp"
16 #include "phi/type_traits/is_referenceable.hpp"
17 
18 DETAIL_PHI_BEGIN_NAMESPACE()
19 
20 template <typename TypeT>
22  : public conditional<is_referenceable<TypeT>::value,
24  typename add_lvalue_reference<TypeT>::type>,
25  false_type>::type
26 {};
27 
28 template <typename TypeT>
30  : public integral_constant<bool, !is_nothrow_swappable<TypeT>::value>
31 {};
32 
33 #if PHI_HAS_FEATURE_VARIABLE_TEMPLATE()
34 
35 template <typename TypeT>
36 PHI_INLINE_VARIABLE PHI_CONSTEXPR bool is_nothrow_swappable_v = is_nothrow_swappable<TypeT>::value;
37 
38 template <typename TypeT>
39 PHI_INLINE_VARIABLE PHI_CONSTEXPR bool is_not_nothrow_swappable_v =
41 
42 #endif
43 
44 DETAIL_PHI_END_NAMESPACE()
45 
46 #endif // INCG_PHI_CORE_TYPE_TRAITS_IS_NOTHROW_SWAPPABLE_HPP
Definition: integral_constant.hpp:19
Definition: is_nothrow_swappable.hpp:21
Definition: add_lvalue_reference.hpp:52
Definition: conditional.hpp:13
Definition: is_nothrow_swappable.hpp:29
Definition: is_nothrow_swappable_with.hpp:41
Definition: is_referenceable.hpp:58