8#ifndef INCLUDED_BSLMF_ISSWAPPABLE
9#define INCLUDED_BSLMF_ISSWAPPABLE
113#include <bslscm_version.h>
132#ifdef BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER
133# include <type_traits>
136#ifndef BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
141#if !defined(BSLS_LIBRARYFEATURES_HAS_CPP17_BASELINE_LIBRARY) && \
142 !defined(BSLS_PLATFORM_CMP_MSVC) && \
143 defined(BSLS_COMPILERFEATURES_SUPPORT_CONSTEXPR) && \
144 defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) && \
145 defined(BSLS_COMPILERFEATURES_SUPPORT_DECLTYPE)
148namespace bslmf_is_swappable_impl_ns {
153template <
class TYPE,
class =
void>
154struct IsSwappable_Impl;
169#if defined(BSLS_LIBRARYFEATURES_HAS_CPP17_BASELINE_LIBRARY)
171using std::is_swappable;
172using std::is_swappable_v;
175#elif defined(BSLS_PLATFORM_CMP_MSVC)
187constexpr bool is_swappable_v = is_swappable<TYPE>::value;
192#elif defined(BSLS_COMPILERFEATURES_SUPPORT_CONSTEXPR) \
193 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) \
194 && defined(BSLS_COMPILERFEATURES_SUPPORT_DECLTYPE)
200 : BloombergLP::bslmf::bslmf_is_swappable_impl_ns::IsSwappable_Impl<TYPE> {
211#ifdef BSLS_COMPILERFEATURES_SUPPORT_VARIABLE_TEMPLATES
214constexpr bool is_swappable_v = is_swappable<TYPE>::value;
228#if !defined(BSLS_LIBRARYFEATURES_HAS_CPP17_BASELINE_LIBRARY) && \
229 !defined(BSLS_PLATFORM_CMP_MSVC) && \
230 defined(BSLS_COMPILERFEATURES_SUPPORT_CONSTEXPR) && \
231 defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) && \
232 defined(BSLS_COMPILERFEATURES_SUPPORT_DECLTYPE)
235namespace bslmf_is_swappable_impl_ns
243template <
class TYPE,
class>
244struct IsSwappable_Impl
252struct IsSwappable_Impl<TYPE,
255 BloombergLP::bslmf::Util::declval<TYPE&>())))>
#define BSLMF_VOIDTYPE(ARG)
Definition bslmf_voidtype.h:335
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
#define BSLS_KEYWORD_INLINE_VARIABLE
Definition bsls_keyword.h:623
void swap(OptionValue &a, OptionValue &b)
Definition bdlb_printmethods.h:283
Definition bdlbb_blob.h:576
void swap(TYPE &a, TYPE &b)
Definition bslmf_integralconstant.h:244
static BSLS_KEYWORD_CONSTEXPR bsl::add_lvalue_reference< t_TYPE >::type declval() BSLS_KEYWORD_NOEXCEPT