-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Open
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++20clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"
Description
| Bugzilla Link | 48860 |
| Version | 11.0 |
| OS | Windows NT |
| CC | @CaseyCarter,@zygoloid |
Extended Description
MSVC recently implemented the following intrinsics needed for P0466R5 Layout-compatibility and Pointer-interconvertibility Traits:
__builtin_is_layout_compatible__builtin_is_pointer_interconvertible_base_of__builtin_is_pointer_interconvertible_with_class__builtin_is_corresponding_member
MSVC STL is planning to use them in <type_traits> as follows (PR: microsoft/STL#1575):
// STRUCT TEMPLATE is_layout_compatible
template <class _Ty1, class _Ty2>
struct is_layout_compatible : bool_constant<__builtin_is_layout_compatible(_Ty1, _Ty2)> {};
template <class _Ty1, class _Ty2>
inline constexpr bool is_layout_compatible_v = __builtin_is_layout_compatible(_Ty1, _Ty2);
// STRUCT TEMPLATE is_pointer_interconvertible_base_of
template <class _Base, class _Derived>
struct is_pointer_interconvertible_base_of
: bool_constant<__builtin_is_pointer_interconvertible_base_of(_Base, _Derived)> {};
template <class _Base, class _Derived>
inline constexpr bool is_pointer_interconvertible_base_of_v = __builtin_is_pointer_interconvertible_base_of(
_Base, _Derived);
// FUNCTION TEMPLATE is_pointer_interconvertible_with_class
template <class _ClassTy, class _MemberTy>
_NODISCARD constexpr bool is_pointer_interconvertible_with_class(_MemberTy _ClassTy::*_Pm) noexcept {
return __builtin_is_pointer_interconvertible_with_class(_ClassTy, _Pm);
}
// FUNCTION TEMPLATE is_corresponding_member
template <class _ClassTy1, class _ClassTy2, class _MemberTy1, class _MemberTy2>
_NODISCARD constexpr bool is_corresponding_member(_MemberTy1 _ClassTy1::*_Pm1, _MemberTy2 _ClassTy2::*_Pm2) noexcept {
return __builtin_is_corresponding_member(_ClassTy1, _ClassTy2, _Pm1, _Pm2);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++20clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"
Type
Projects
Status
In Progress