From 8f11724067248acc330b4d1f12f0c76d03f2cfb1 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Thu, 13 Jun 2019 09:14:42 -0700 Subject: Export of internal Abseil changes. -- fc61fc3822d414a1abda906a81208d2667195de3 by Abseil Team : Clarify documentation relating to the output of the various printing functions. PiperOrigin-RevId: 253041344 -- 06cb414d1006cd89e38b381d52763b048909d69a by Jorg Brown : Change absl::container_internal::CompressedTuple to instantiate its internal Storage class with the name of the type it's holding, rather than the name of the Tuple. This is not an externally-visible change, other than less compiler memory is used and less debug information is generated. PiperOrigin-RevId: 252940185 -- 33b3f3ed6037eac7d1b7989a3641370e92beaeb9 by Jorg Brown : Change absl::container_internal::CompressedTuple to instantiate its internal Storage class with the name of the type it's holding, rather than the name of the Tuple. This is not an externally-visible change, other than less compiler memory is used and less debug information is generated. PiperOrigin-RevId: 252902091 -- 88595f4e7d6ac57bebdc9811045867f5d7477b5b by Abseil Team : Unset thread_local/__thread support for Emscripten. PiperOrigin-RevId: 252706297 -- cabd1715d873dc457271940335c764e62defb952 by Derek Mauro : Rollback LLVM and Bazel version due to intermittent network failures downloading from GitHub PiperOrigin-RevId: 252661245 GitOrigin-RevId: fc61fc3822d414a1abda906a81208d2667195de3 Change-Id: I4c30995a2db7acef19415ad519259131584db261 --- absl/strings/str_format.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'absl/strings/str_format.h') diff --git a/absl/strings/str_format.h b/absl/strings/str_format.h index da3208e..0b93c28 100644 --- a/absl/strings/str_format.h +++ b/absl/strings/str_format.h @@ -20,7 +20,8 @@ // The `str_format` library is a typesafe replacement for the family of // `printf()` string formatting routines within the `` standard library // header. Like the `printf` family, the `str_format` uses a "format string" to -// perform argument substitutions based on types. +// perform argument substitutions based on types. See the `FormatSpec` section +// below for format string documentation. // // Example: // @@ -67,6 +68,7 @@ // In addition, the `str_format` library provides extension points for // augmenting formatting to new types. These extensions are fully documented // within the `str_format_extension.h` header file. + #ifndef ABSL_STRINGS_STR_FORMAT_H_ #define ABSL_STRINGS_STR_FORMAT_H_ @@ -211,6 +213,11 @@ class FormatCountCapture { // written to this point. The resulting value must be captured within an // `absl::FormatCountCapture` type. // +// Implementation-defined behavior: +// * A null pointer provided to "%s" or "%p" is output as "(nil)". +// * A non-null pointer provided to "%p" is output in hex as if by %#x or +// %#lx. +// // NOTE: `o`, `x\X` and `u` will convert signed values to their unsigned // counterpart before formatting. // @@ -226,7 +233,7 @@ class FormatCountCapture { // "%e", .01 -> "1.00000e-2" // "%a", -3.0 -> "-0x1.8p+1" // "%g", .01 -> "1e-2" -// "%p", *int -> "0x7ffdeb6ad2a4" +// "%p", (void*)&value -> "0x7ffdeb6ad2a4" // // int n = 0; // std::string s = absl::StrFormat( -- cgit v1.2.3