about summary refs log tree commit diff
path: root/absl/strings/internal/str_format/arg.h
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2019-05-17T17·51-0700
committerAndy Soffer <asoffer@google.com>2019-05-17T18·57-0400
commit8a394b19c149cab50534b04c5e21d42bc2217a7d (patch)
tree3ea451639d15b28cb2d5749be5267818669247ec /absl/strings/internal/str_format/arg.h
parentdaf381e8535a1f1f1b8a75966a74e7cca63dee89 (diff)
Export of internal Abseil changes.
--
cae9f0c87632d690ec3f471e181be247fe4fb025 by Abseil Team <absl-team@google.com>:

Run IWYU on some headers.

PiperOrigin-RevId: 248749194

--
f57dcac97cacbe31769a8646020a99b6686987dc by Samuel Benzaquen <sbenza@google.com>:

Accept vector<bool>::reference in StrFormat and friends.

The proxy types might overload `operator&`. Use std::addressof instead.

PiperOrigin-RevId: 248619661
GitOrigin-RevId: cae9f0c87632d690ec3f471e181be247fe4fb025
Change-Id: Iacf5d46a59d1d5f1fa1fd4a1e0d0de8c6cbedb3e
Diffstat (limited to 'absl/strings/internal/str_format/arg.h')
-rw-r--r--absl/strings/internal/str_format/arg.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/absl/strings/internal/str_format/arg.h b/absl/strings/internal/str_format/arg.h
index 4d48af066aee..5cb3a14d6833 100644
--- a/absl/strings/internal/str_format/arg.h
+++ b/absl/strings/internal/str_format/arg.h
@@ -7,6 +7,7 @@
 #include <cstdio>
 #include <iomanip>
 #include <limits>
+#include <memory>
 #include <sstream>
 #include <string>
 #include <type_traits>
@@ -292,7 +293,7 @@ class FormatArgImpl {
   struct Manager<T, ByPointer> {
     static Data SetValue(const T& value) {
       Data data;
-      data.ptr = &value;
+      data.ptr = std::addressof(value);
       return data;
     }