From c9894d1dc38577c4ce50eefe0a944ea8d46d7fc5 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Fri, 30 Oct 2020 10:38:44 -0700 Subject: Export of internal Abseil changes -- dce086fa6e045bed433c664f95a6581b7ffb2d98 by Abseil Team : fix spelling error "fulfil" -> "fulfill" PiperOrigin-RevId: 339898016 -- 10faa4546b69d8a07f949bc03dd9671231232ad0 by Abseil Team : Clarify comments on variant::emplace PiperOrigin-RevId: 339897241 -- 0d02261a7a8b9c11e3a4e76dfedf4d95590e2419 by Derek Mauro : Use thread_local for ThreadIdentity storage on Apple platforms that support it PiperOrigin-RevId: 339698124 GitOrigin-RevId: dce086fa6e045bed433c664f95a6581b7ffb2d98 Change-Id: I8c668b33c805fd5231ceb285652c80f312e5a33a --- absl/types/variant.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'absl/types') diff --git a/absl/types/variant.h b/absl/types/variant.h index 776d19a1..ac93464b 100644 --- a/absl/types/variant.h +++ b/absl/types/variant.h @@ -604,7 +604,10 @@ class variant : private variant_internal::VariantBase { // emplace() Functions - // Constructs a value of the given alternative type T within the variant. + // Constructs a value of the given alternative type T within the variant. The + // existing value of the variant is destroyed first (provided that + // `absl::valueless_by_exception()` is false). Requires that T is unambiguous + // in the variant. // // Example: // @@ -624,7 +627,9 @@ class variant : private variant_internal::VariantBase { } // Constructs a value of the given alternative type T within the variant using - // an initializer list. + // an initializer list. The existing value of the variant is destroyed first + // (provided that `absl::valueless_by_exception()` is false). Requires that T + // is unambiguous in the variant. // // Example: // @@ -643,7 +648,7 @@ class variant : private variant_internal::VariantBase { } // Destroys the current value of the variant (provided that - // `absl::valueless_by_exception()` is false, and constructs a new value at + // `absl::valueless_by_exception()` is false) and constructs a new value at // the given index. // // Example: @@ -662,7 +667,7 @@ class variant : private variant_internal::VariantBase { } // Destroys the current value of the variant (provided that - // `absl::valueless_by_exception()` is false, and constructs a new value at + // `absl::valueless_by_exception()` is false) and constructs a new value at // the given index using an initializer list and the provided arguments. // // Example: -- cgit v1.2.3