public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* RFC: Include <charconv> in <utility> for C++17
@ 2019-06-27  8:33 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2019-06-27  8:33 UTC (permalink / raw)
  To: libstdc++, gcc-patches

I wonder if we want this patch:

--- a/libstdc++-v3/include/std/utility
+++ b/libstdc++-v3/include/std/utility
@@ -74,6 +74,9 @@
 #include <type_traits>
 #include <bits/move.h>
 #include <initializer_list>
+#if __cplusplus == 201703L && defined __STRICT_ANSI__
+# include <charconv>
+#endif

 namespace std _GLIBCXX_VISIBILITY(default)
 {

In the published C++17 standard, std::to_chars and std::from_chars are
meant to be in <utility>. The new <charconv> header was only
introduced post-C++17 by a defect report (specifically, by P0682R1).

But maybe this isn't needed, because there's no code in the wild that
was written before <charconv> was invented, so everybody should
already be using that.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-06-27  8:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-27  8:33 RFC: Include <charconv> in <utility> for C++17 Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).