summaryrefslogtreecommitdiff
path: root/absl/meta
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2023-03-24 17:03:36 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-03-24 17:04:24 -0700
commitc9f49460fa38cc24c3f476eb2998abca105cf63d (patch)
tree40ba92f6b5fafd804efaa16e1b6c8811639d8528 /absl/meta
parentc92b6ce052ec4507e6f7ae44b435ab57e3e0fba6 (diff)
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
Diffstat (limited to 'absl/meta')
-rw-r--r--absl/meta/type_traits.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/absl/meta/type_traits.h b/absl/meta/type_traits.h
index fb12ba4a..25462580 100644
--- a/absl/meta/type_traits.h
+++ b/absl/meta/type_traits.h
@@ -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:
//