@@ -1680,6 +1680,7 @@ Static assert with user-generated message __cpp_static_assert >= 202306L C
16801680Pack Indexing __cpp_pack_indexing C++26 C++03
16811681``= delete ("should have a reason"); `` __cpp_deleted_function C++26 C++03
16821682Variadic Friends __cpp_variadic_friend C++26 C++03
1683+ Trivial Relocatability __cpp_trivial_relocatability C++26 C++03
16831684--------------------------------------------- -------------------------------- ------------- -------------
16841685Designated initializers (N494) C99 C89
16851686Array & element qualification (N2607) C23 C89
@@ -1861,8 +1862,15 @@ The following type trait primitives are supported by Clang. Those traits marked
18611862* ``__is_trivially_relocatable `` (Clang): Returns true if moving an object
18621863 of the given type, and then destroying the source object, is known to be
18631864 functionally equivalent to copying the underlying bytes and then dropping the
1864- source object on the floor. This is true of trivial types and types which
1865+ source object on the floor. This is true of trivial types,
1866+ C++26 relocatable types, and types which
18651867 were made trivially relocatable via the ``clang::trivial_abi `` attribute.
1868+ * ``__builtin_is_cpp_trivially_relocatable `` (C++): Returns true if an object
1869+ is trivially relocatable, as defined by the C++26 standard [meta.unary.prop].
1870+ Note that when relocating the caller code should ensure that if the object is polymorphic,
1871+ the dynamic type is of the most derived type. Padding bytes should not be copied.
1872+ * ``__builtin_is_replaceable `` (C++): Returns true if an object
1873+ is replaceable, as defined by the C++26 standard [meta.unary.prop].
18661874* ``__is_trivially_equality_comparable `` (Clang): Returns true if comparing two
18671875 objects of the provided type is known to be equivalent to comparing their
18681876 object representations. Note that types containing padding bytes are never
@@ -3722,6 +3730,21 @@ Query for this feature with ``__has_builtin(__builtin_operator_new)`` or
37223730 replaceable global (de)allocation functions, but do support calling at least
37233731 ``::operator new(size_t) `` and ``::operator delete(void*) ``.
37243732
3733+
3734+ ``__builtin_trivially_relocate ``
3735+ -----------------------------------
3736+
3737+ **Syntax **:
3738+
3739+ .. code-block :: c
3740+
3741+ T* __builtin_trivially_relocate(T* dest, T* src, size_t count)
3742+
3743+ Trivially relocates ``count `` objects of relocatable, complete type ``T ``
3744+ from ``src `` to ``dest `` and returns ``dest ``.
3745+ This builtin is used to implement ``std::trivially_relocate ``.
3746+
3747+
37253748``__builtin_preserve_access_index ``
37263749-----------------------------------
37273750
0 commit comments