8#ifndef INCLUDED_BSLMF_ISNOTHROWMOVECONSTRUCTIBLE
9#define INCLUDED_BSLMF_ISNOTHROWMOVECONSTRUCTIBLE
76#include <bslscm_version.h>
93#ifdef BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER
94# include <type_traits>
97#ifndef BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
103template <
class t_TYPE>
104struct is_nothrow_move_constructible;
128#define STD_IS_NOTHROW_MOVE_CONSTRUCTIBLE_VALUE(t_TYPE) \
129 (bsl::is_array<t_TYPE>::value \
131 : ::std::is_nothrow_move_constructible<t_TYPE>::value)
140#if defined(BSLS_PLATFORM_CMP_SUN) && \
141 (BSLS_PLATFORM_CMP_VERSION == 0x5150) && \
142 (BSLS_COMPILERFEATURES_CPLUSPLUS == 199711L)
145#define BSLMF_ISNOTHROWMOVECONSTRUCTIBLE_VOIDTYPE(t_TYPE) \
146 typename bsl::enable_if<!bsl::is_const<t_TYPE>::value && \
147 !bsl::is_volatile<t_TYPE>::value, \
148 BSLMF_VOIDTYPE(int t_TYPE::*)>::type
150#define BSLMF_ISNOTHROWMOVECONSTRUCTIBLE_VOIDTYPE(t_TYPE) \
151 BSLMF_VOIDTYPE(int t_TYPE::*)
154#if defined(BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER)
159template <
class t_TYPE,
class =
void>
160struct IsNothrowMoveConstructible_Impl
162 STD_IS_NOTHROW_MOVE_CONSTRUCTIBLE_VALUE(t_TYPE)> {
171template <
class t_TYPE>
172struct IsNothrowMoveConstructible_Impl<
177 STD_IS_NOTHROW_MOVE_CONSTRUCTIBLE_VALUE(t_TYPE) ||
178 bslmf::IsBitwiseCopyable<t_TYPE>::value ||
179 DetectNestedTrait<t_TYPE,
180 bsl::is_nothrow_move_constructible>::value> {
182 enum { k_CHECK_COMPLETE =
sizeof(t_TYPE) };
185template <
class t_TYPE>
186struct IsNothrowMoveConstructible_Impl<
191 STD_IS_NOTHROW_MOVE_CONSTRUCTIBLE_VALUE(const t_TYPE) ||
192 bslmf::IsBitwiseCopyable<t_TYPE>::value> {
193 enum { k_CHECK_COMPLETE =
sizeof(t_TYPE) };
196template <
class t_TYPE>
197struct IsNothrowMoveConstructible_Impl<
202 STD_IS_NOTHROW_MOVE_CONSTRUCTIBLE_VALUE(volatile t_TYPE)> {
203 enum { k_CHECK_COMPLETE =
sizeof(t_TYPE) };
206template <
class t_TYPE>
207struct IsNothrowMoveConstructible_Impl<
208 const volatile t_TYPE,
212 STD_IS_NOTHROW_MOVE_CONSTRUCTIBLE_VALUE(const volatile t_TYPE)> {
213 enum { k_CHECK_COMPLETE =
sizeof(t_TYPE) };
224#undef STD_IS_NOTHROW_MOVE_CONSTRUCTIBLE_VALUE
233template <
class t_TYPE,
class =
void>
244template <
class t_TYPE>
250 bslmf::IsBitwiseCopyable<t_TYPE>::value ||
251 DetectNestedTrait<t_TYPE,
252 bsl::is_nothrow_move_constructible>::value> {
254 enum { k_CHECK_COMPLETE =
sizeof(t_TYPE) };
257template <
class t_TYPE>
262 enum { k_CHECK_COMPLETE =
sizeof(t_TYPE) };
265template <
class t_TYPE>
269 enum { k_CHECK_COMPLETE =
sizeof(t_TYPE) };
272template <
class t_TYPE>
274 const volatile t_TYPE,
276 enum { k_CHECK_COMPLETE =
sizeof(t_TYPE) };
286#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
287template <
class t_TYPE>
288struct IsNothrowMoveConstructible_Impl<t_TYPE&&> :
bsl::true_type {
291template <
class t_TYPE>
297template <
class t_TYPE>
300template <
class t_TYPE>
303template <
class t_TYPE>
306template <
class t_TYPE>
310template <
class t_TYPE,
size_t t_LEN>
313template <
class t_TYPE,
size_t t_LEN>
316template <
class t_TYPE,
size_t t_LEN>
320template <
class t_TYPE,
size_t t_LEN>
356template <
class t_TYPE>
358: BloombergLP::bslmf::IsNothrowMoveConstructible_Impl<t_TYPE>::type {
361#ifdef BSLS_COMPILERFEATURES_SUPPORT_VARIABLE_TEMPLATES
364template <
class t_TYPE>
#define BSLMF_ISNOTHROWMOVECONSTRUCTIBLE_VOIDTYPE(t_TYPE)
Definition bslmf_isnothrowmoveconstructible.h:150
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
#define BSLS_KEYWORD_INLINE_VARIABLE
Definition bsls_keyword.h:623
Definition bdlb_printmethods.h:283
Definition bdlbb_blob.h:576
Definition bslmf_integralconstant.h:244
Definition bslmf_isnothrowmoveconstructible.h:358
Definition bslmf_isbitwisecopyable.h:298
Definition bslmf_isnothrowmoveconstructible.h:235