8#ifndef INCLUDED_BSLMF_ISTRIVIALLYCOPYABLE
9#define INCLUDED_BSLMF_ISTRIVIALLYCOPYABLE
165#include <bslscm_version.h>
179#ifndef BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
185#ifdef BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER
186# include <type_traits>
189#ifndef BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
193#ifdef BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER
194#define BSLMF_ISTRIVIALLYCOPYABLE_NATIVE_IMPLEMENTATION
202#if (defined(BSLS_PLATFORM_CMP_GNU) && BSLS_PLATFORM_CMP_VERSION < 50000) \
203 || (defined(BSLS_PLATFORM_CMP_MSVC) && BSLS_PLATFORM_CMP_VERSION < 1900)
204# undef BSLMF_ISTRIVIALLYCOPYABLE_NATIVE_IMPLEMENTATION
211template <
class t_TYPE>
212struct is_trivially_copyable;
214#ifdef BSLS_COMPILERFEATURES_SUPPORT_VARIABLE_TEMPLATES
217template <
class t_TYPE>
219 is_trivially_copyable<t_TYPE>::value;
226namespace bsls {
class TimeInterval; }
242template <
class t_TYPE,
bool t_K_INTRINSIC = false>
250template <
class t_TYPE>
254#ifdef BSLMF_ISTRIVIALLYCOPYABLE_NATIVE_IMPLEMENTATION
258template <
class t_TYPE>
262 ::std::is_trivially_copyable<t_TYPE>::value>::type {
269template <
class t_TYPE>
273 bsl::is_fundamental<t_TYPE>::value || bsl::is_enum<t_TYPE>::value ||
274 bsl::is_pointer<t_TYPE>::value ||
275 bsl::is_member_pointer<t_TYPE>::value>::type {
285#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
286template <
class NON_CV_TYPE,
class =
void>
287struct IsTriviallyCopyable_Solaris
301template <
class NON_CV_TYPE>
302struct IsTriviallyCopyable_Solaris<NON_CV_TYPE,
BSLMF_VOIDTYPE(NON_CV_TYPE[])>
327template <
class t_TYPE>
329: BloombergLP::bslmf::IsTriviallyCopyable_Intrinsic<t_TYPE>::type {
335template <
class t_TYPE>
339#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
343template <
class t_TYPE>
348#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
357template <
class t_TYPE>
358struct is_trivially_copyable<const t_TYPE>
359: BloombergLP::bslmf::IsTriviallyCopyable_Solaris<t_TYPE>::type {
364template <
class t_TYPE>
365struct is_trivially_copyable<volatile t_TYPE>
366: BloombergLP::bslmf::IsTriviallyCopyable_Solaris<t_TYPE>::type {
371template <
class t_TYPE>
372struct is_trivially_copyable<const volatile t_TYPE>
373: BloombergLP::bslmf::IsTriviallyCopyable_Solaris<t_TYPE>::type {
380template <
class t_TYPE>
387template <
class t_TYPE>
394template <
class t_TYPE>
402template <
class t_TYPE,
size_t t_LEN>
409template <
class t_TYPE,
size_t t_LEN>
416template <
class t_TYPE,
size_t t_LEN>
423template <
class t_TYPE,
size_t t_LEN>
428#if !defined(BSLS_PLATFORM_CMP_IBM)
434template <
class t_TYPE>
440template <
class t_TYPE>
447template <
class t_TYPE>
454template <
class t_TYPE>
480#ifndef BSLMF_ISTRIVIALLYCOPYABLE_NATIVE_IMPLEMENTATION
496template <
class t_TYPE>
499#if defined(BSLS_COMPILERFEATURES_SUPPORT_STATIC_ASSERT) && \
500 defined(BSLMF_ISTRIVIALLYCOPYABLE_NATIVE_IMPLEMENTATION)
505 std::is_trivially_copyable<t_TYPE>::value,
506 "Types with copy constructors or destructors defined "
507 "or deleted may be declared 'bslmf::IsBitwiseCopyable', "
508 "if the type author is certain that using 'memcpy' on "
509 "the type is safe. Declaring such types"
510 " 'bsl::is_trivially_copyable' is, however, prohibited.");
Definition bsls_timeinterval.h:301
#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
Definition bdlb_printmethods.h:283
Definition bdlbb_blob.h:576
Definition bdlt_iso8601util.h:691
Definition bslmf_istriviallycopyable.h:329
Definition bslmf_detectnestedtrait.h:464
Definition bslmf_istriviallycopyable.h:497
Definition bslmf_istriviallycopyable.h:244
Definition bslmf_istriviallycopyable.h:275
This struct is empty and represents a nil type.
Definition bslmf_nil.h:131