Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions stl/inc/type_traits
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,7 @@ _EXPORT_STD template <class _Ty>
_NO_SPECIALIZATIONS_OF_TYPE_TRAITS constexpr bool is_enum_v = __is_enum(_Ty);

#if _HAS_CXX23
#if defined(__clang__) && !defined(__EDG__) \
&& __clang_major__ >= 16 // TRANSITION, DevCom-10870354 (MSVC, EDG), VSO-2397560 (RWC relying on ancient Clang)
#ifdef __clang__ // TRANSITION, DevCom-10870354 (MSVC, EDG)
_EXPORT_STD template <class _Ty>
_NO_SPECIALIZATIONS_OF_TYPE_TRAITS constexpr bool is_scoped_enum_v = __is_scoped_enum(_Ty);

Expand Down Expand Up @@ -2014,15 +2013,13 @@ _NO_SPECIALIZATIONS_OF_TYPE_TRAITS constexpr bool is_nothrow_invocable_r_v =
#endif // _HAS_CXX17

#if _HAS_CXX20
#if !defined(__clang__) || defined(__EDG__) \
|| __clang_major__ >= 19 // TRANSITION, VSO-2397560 (RWC relying on ancient Clang)
_EXPORT_STD template <class _Ty1, class _Ty2>
struct _NO_SPECIALIZATIONS_OF_TYPE_TRAITS is_layout_compatible : bool_constant<__is_layout_compatible(_Ty1, _Ty2)> {};

_EXPORT_STD template <class _Ty1, class _Ty2>
_NO_SPECIALIZATIONS_OF_TYPE_TRAITS constexpr bool is_layout_compatible_v = __is_layout_compatible(_Ty1, _Ty2);

#if !defined(__clang__) || defined(__EDG__) // TRANSITION, LLVM-135273
#ifndef __clang__ // TRANSITION, LLVM-135273
_EXPORT_STD template <class _Base, class _Derived>
struct _NO_SPECIALIZATIONS_OF_TYPE_TRAITS is_pointer_interconvertible_base_of
: bool_constant<__is_pointer_interconvertible_base_of(_Base, _Derived)> {};
Expand All @@ -2039,7 +2036,6 @@ _EXPORT_STD template <class _Base, class _Derived>
_NO_SPECIALIZATIONS_OF_TYPE_TRAITS constexpr bool is_pointer_interconvertible_base_of_v =
__is_pointer_interconvertible_base_of(remove_cv_t<_Base>, remove_cv_t<_Derived>);
#endif // ^^^ workaround ^^^
#endif // ^^^ no workaround ^^^

#ifndef __clang__ // TRANSITION, LLVM-48860
_EXPORT_STD template <class _ClassTy, class _MemberTy>
Expand Down
14 changes: 3 additions & 11 deletions stl/inc/xutility
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,6 @@ _STL_DISABLE_CLANG_WARNINGS
#endif // _USE_STD_VECTOR_FLOATING_ALGORITHMS && !_USE_STD_VECTOR_ALGORITHMS
#endif // ^^^ defined(_USE_STD_VECTOR_FLOATING_ALGORITHMS) ^^^

#ifndef _USE_BUILTIN_IS_TRIVIALLY_EQUALITY_COMPARABLE
#if defined(__clang__) && __clang_major__ >= 19
#define _USE_BUILTIN_IS_TRIVIALLY_EQUALITY_COMPARABLE 1
#else // ^^^ defined(__clang__) && __clang_major__ >= 19 / !defined(__clang__) || __clang_major__ < 19 vvv
#define _USE_BUILTIN_IS_TRIVIALLY_EQUALITY_COMPARABLE 0
#endif // ^^^ !defined(__clang__) || __clang_major__ < 19 ^^^
#endif // ^^^ !defined(_USE_BUILTIN_IS_TRIVIALLY_EQUALITY_COMPARABLE) ^^^

extern "C" {
// The "noalias" attribute tells the compiler optimizer that pointers going into these hand-vectorized algorithms
// won't be stored beyond the lifetime of the function, and that the function will only reference arrays denoted by
Expand Down Expand Up @@ -5673,14 +5665,14 @@ inline constexpr bool _Can_memcmp_elements<byte, byte, false> = true;
template <class _Ty1, class _Ty2>
constexpr bool _Can_memcmp_elements<_Ty1*, _Ty2*, false> = _Is_pointer_address_comparable<_Ty1, _Ty2>;

#if _USE_BUILTIN_IS_TRIVIALLY_EQUALITY_COMPARABLE
#ifdef __clang__
template <class _Elem1, class _Elem2>
constexpr bool _Is_same_and_builtin_trivially_equality_comparable =
is_same_v<_Elem1, _Elem2> && __is_trivially_equality_comparable(_Elem1);
#else // ^^^ _USE_BUILTIN_IS_TRIVIALLY_EQUALITY_COMPARABLE / !_USE_BUILTIN_IS_TRIVIALLY_EQUALITY_COMPARABLE vvv
#else // ^^^ defined(__clang__) / !defined(__clang__) vvv
template <class _Elem1, class _Elem2>
constexpr bool _Is_same_and_builtin_trivially_equality_comparable = false;
#endif // ^^^ !_USE_BUILTIN_IS_TRIVIALLY_EQUALITY_COMPARABLE ^^^
#endif // ^^^ !defined(__clang__) ^^^

template <class _Elem1, class _Elem2>
constexpr bool _Can_memcmp_elements<_Elem1, _Elem2, false> =
Expand Down
2 changes: 0 additions & 2 deletions stl/inc/yvals.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,6 @@ _EMIT_STL_ERROR(STL1008, "_STL_CALL_ABORT_INSTEAD_OF_INVALID_PARAMETER has been
#ifndef _MSVC_STL_DOOM_FUNCTION
#ifdef _MSVC_STL_USE_ABORT_AS_DOOM_FUNCTION // The user wants to use abort():
#define _MSVC_STL_DOOM_FUNCTION(mesg) _CSTD abort()
#elif defined(__clang__) && __clang_major__ < 19 // TRANSITION, VSO-2397560, Real World Code relying on ancient Clang
#define _MSVC_STL_DOOM_FUNCTION(mesg) __builtin_trap()
#elif defined(__clang__) // Use the Clang intrinsic:
#define _MSVC_STL_DOOM_FUNCTION(mesg) __builtin_verbose_trap("MSVC STL error", mesg)
#elif defined(_M_CEE) // TRANSITION, VSO-2457624 (/clr silent bad codegen for __fastfail); /clr:pure lacks __fastfail
Expand Down
4 changes: 1 addition & 3 deletions stl/inc/yvals_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -1951,9 +1951,7 @@ _EMIT_STL_ERROR(STL1013, "The STL doesn't support /RTCc because it rejects confo
#define _STL_INTERNAL_STATIC_ASSERT(...)
#endif // ^^^ !defined(_ENABLE_STL_INTERNAL_CHECK) ^^^

#if defined(__CUDACC__) || (defined(__clang__) && __clang_major__ < 16)
// TRANSITION, CUDA 12.4 doesn't have downlevel support for static call operators.
// TRANSITION, VSO-2397560, temporary workaround for Real World Code relying on ancient Clang versions.
#ifdef __CUDACC__ // TRANSITION, CUDA 12.4 doesn't have downlevel support for static call operators.
#define _STATIC_CALL_OPERATOR
#define _CONST_CALL_OPERATOR const
#else // ^^^ workaround / no workaround vvv
Expand Down