mirror of
https://github.com/abseil/abseil-cpp.git
synced 2026-06-04 12:07:05 +08:00
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
This commit is contained in:
committed by
Copybara-Service
parent
c92b6ce052
commit
c9f49460fa
@@ -474,9 +474,14 @@ using swap_internal::StdSwapIsUnconstrained;
|
||||
} // namespace type_traits_internal
|
||||
|
||||
// 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
|
||||
// elision.
|
||||
//
|
||||
// Detects whether a type is known to be "trivially relocatable" -- meaning it
|
||||
// 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:
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user