[PATCH 1/2] libstdc++: Use diagnose_as attribute to improve string diagnostics

Matthias Kretz m.kretz@gsi.de
Mon Nov 15 17:05:20 GMT 2021



This hides the basic_string template in all diagnostics, reducing the
signal-to-noise ratio significantly. It also hides the std::__cxx11
namespace from users by presenting it as std.

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>

libstdc++-v3/ChangeLog:

	PR c++/89370
	* include/bits/c++config: Diagnose std::__cxx11:: as std:: using
	the diagnose_as attribute.
	* include/bits/stringfwd.h: Add diagnose_as attribute to string,
	wstring, u8string, u16string, and u32string.
	* include/debug/string: Ditto.
	* include/experimental/string: Ditto.
	* include/std/string: Ditto.
---
 libstdc++-v3/include/bits/c++config      |  3 ++-
 libstdc++-v3/include/bits/stringfwd.h    | 10 +++++-----
 libstdc++-v3/include/debug/string        | 10 +++++-----
 libstdc++-v3/include/experimental/string | 10 +++++-----
 libstdc++-v3/include/std/string          | 10 +++++-----
 5 files changed, 22 insertions(+), 21 deletions(-)


--
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 stdₓ::simd
──────────────────────────────────────────────────────────────────────────
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libstdc-Use-diagnose_as-attribute-to-improve-string-.patch
Type: text/x-patch
Size: 4940 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20211115/60f9a830/attachment.bin>


More information about the Libstdc++ mailing list