1 #ifndef INCG_PHI_CORE_TYPE_TRAITS_IS_SWAPPABLE_WITH_HPP 2 #define INCG_PHI_CORE_TYPE_TRAITS_IS_SWAPPABLE_WITH_HPP 4 #include "phi/phi_config.hpp" 6 #if PHI_HAS_EXTENSION_PRAGMA_ONCE() 10 #include "phi/algorithm/swap.hpp" 11 #include "phi/compiler_support/constexpr.hpp" 12 #include "phi/compiler_support/inline_variables.hpp" 13 #include "phi/core/declval.hpp" 14 #include "phi/type_traits/integral_constant.hpp" 15 #include "phi/type_traits/void_t.hpp" 17 DETAIL_PHI_BEGIN_NAMESPACE()
23 template <
typename TypeT,
typename OtherT,
typename =
void>
27 template <
typename TypeT,
typename OtherT>
29 TypeT, OtherT, void_t<decltype(swap(
phi::declval<TypeT>(), phi::declval<OtherT>()))>>
33 template <
typename TypeT,
typename OtherT>
35 :
public integral_constant<bool, is_swappable_with_helper<TypeT, OtherT>::value &&
36 is_swappable_with_helper<OtherT, TypeT>::value>
40 template <
typename TypeT,
typename OtherT>
42 :
public integral_constant<bool, detail::is_swappable_with_impl<TypeT, OtherT>::value>
45 template <
typename TypeT,
typename OtherT>
50 #if PHI_HAS_FEATURE_VARIABLE_TEMPLATE() 52 template <
typename TypeT,
typename OtherT>
53 PHI_INLINE_VARIABLE PHI_CONSTEXPR
bool is_swappable_with_v =
56 template <
typename TypeT,
typename OtherT>
57 PHI_INLINE_VARIABLE PHI_CONSTEXPR
bool is_not_swappable_with_v =
62 DETAIL_PHI_END_NAMESPACE()
64 #endif // INCG_PHI_CORE_TYPE_TRAITS_IS_SWAPPABLE_WITH_HPP Definition: integral_constant.hpp:19
Definition: is_swappable_with.hpp:46
Definition: is_swappable_with.hpp:41
Definition: common_type.test.cpp:195
Definition: is_swappable_with.hpp:24
Definition: is_swappable_with.hpp:34