Commit c9f49460 by Abseil Team Committed by Copybara-Service

type_traits: touch up the docs for is_trivially_relocatable.

Clarify that the trait is conservative: it's safe to act on if it's true, but
false doesn't necessarily mean anything. Of course this is the only reasonable
way to use it, but I think it's helpful to be explicit, especially because
currently this trait *always* returns false on some platforms even for a type
like int.

PiperOrigin-RevId: 519272294
Change-Id: Ic63a48dcf18efc0756046b3d6f51d11cbb46a469
parent c92b6ce0
...@@ -474,9 +474,14 @@ using swap_internal::StdSwapIsUnconstrained; ...@@ -474,9 +474,14 @@ using swap_internal::StdSwapIsUnconstrained;
} // namespace type_traits_internal } // namespace type_traits_internal
// absl::is_trivially_relocatable<T> // absl::is_trivially_relocatable<T>
// Detects whether a type is "trivially relocatable" -- meaning it can be //
// relocated without invoking the constructor/destructor, using a form of move // Detects whether a type is known to be "trivially relocatable" -- meaning it
// elision. // can be relocated without invoking the constructor/destructor, using a form of
// move elision.
//
// This trait is conservative, for backwards compatibility. If it's true then
// the type is definitely trivially relocatable, but if it's false then the type
// may or may not be.
// //
// Example: // Example:
// //
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment