Skip to content

Commit

Permalink
Add is_trivially_* traits on mainline Clang (#5044)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3nsor authored and GitHub Enterprise committed Oct 23, 2024
1 parent af80682 commit f5157ca
Showing 1 changed file with 3 additions and 25 deletions.
28 changes: 3 additions & 25 deletions groups/bsl/bsl+bslhdrs/bsl_type_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ BSLS_IDENT("$Id: $")
// support macros if they are already defined, so that it is possible to define
// them on the compiler command line to 0 or 1 regardless of platform.

#if defined(BSLS_PLATFORM_CMP_MSVC)
#if defined(BSLS_PLATFORM_CMP_MSVC) || \
defined(BSLS_PLATFORM_CMP_GNU) || \
defined(BSLS_PLATFORM_CMP_CLANG)
# ifndef BSL_TYPE_TRAITS_HAS_IS_TRIVIALLY_TRAITS
# define BSL_TYPE_TRAITS_HAS_IS_TRIVIALLY_TRAITS 1
# endif
Expand All @@ -80,30 +82,6 @@ BSLS_IDENT("$Id: $")
# endif
#endif

#if defined(BSLS_PLATFORM_CMP_GNU)
# if BSLS_PLATFORM_CMP_VERSION >= 50000
# ifndef BSL_TYPE_TRAITS_HAS_IS_TRIVIALLY_TRAITS
# define BSL_TYPE_TRAITS_HAS_IS_TRIVIALLY_TRAITS 1
# endif
# ifndef BSL_TYPE_TRAITS_HAS_ALIGNED_UNION
# define BSL_TYPE_TRAITS_HAS_ALIGNED_UNION 1
# endif
# endif
#endif

#if defined(BSLS_PLATFORM_CMP_CLANG)
# if defined(__APPLE_CC__) && __APPLE_CC__ >= 6000
# ifndef BSL_TYPE_TRAITS_HAS_IS_TRIVIALLY_TRAITS
# define BSL_TYPE_TRAITS_HAS_IS_TRIVIALLY_TRAITS 1
# endif
# if defined(BSLS_COMPILERFEATURES_SUPPORT_VARIADIC_TEMPLATES)
# ifndef BSL_TYPE_TRAITS_HAS_ALIGNED_UNION
# define BSL_TYPE_TRAITS_HAS_ALIGNED_UNION 1
# endif
# endif
# endif
#endif

namespace bsl {
// Import selected symbols into bsl namespace

Expand Down

0 comments on commit f5157ca

Please sign in to comment.