public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] [PR105324] libstdc++: testsuite: pr105324 requires FP from_char
@ 2022-05-03 2:51 Alexandre Oliva
0 siblings, 0 replies; only message in thread
From: Alexandre Oliva @ 2022-05-03 2:51 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:02f28c3795c77025cd9820635bdac2f53237fb17
commit 02f28c3795c77025cd9820635bdac2f53237fb17
Author: Alexandre Oliva <oliva@adacore.com>
Date: Mon May 2 23:49:36 2022 -0300
[PR105324] libstdc++: testsuite: pr105324 requires FP from_char
The floating-point overloads of from_char are only declared if
_GLIBCXX_HAVE_USELOCALE is #defined as nonzero. That's exposed from
charconv as _cpp_lib_to_chars >= 201611L, so guard the test body with
that.
for libstdc++-v3/ChangeLog
PR c++/105324
* testsuite/20_util/from_chars/pr105324.cc: Guard test body
with conditional for floating-point overloads of from_char.
Diff:
---
libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc b/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc
index cecb17e41cc..a9e08303ef4 100644
--- a/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc
+++ b/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc
@@ -5,10 +5,12 @@
int main()
{
+#if _cpp_lib_to_chars >= 201611L // FP from_char not available otherwise.
// PR libstdc++/105324
// std::from_chars() assertion at floating_from_chars.cc:78
std::string s(512, '1');
s[1] = '.';
long double d;
std::from_chars(s.data(), s.data() + s.size(), d);
+#endif
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-03 2:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-03 2:51 [gcc(refs/users/aoliva/heads/testme)] [PR105324] libstdc++: testsuite: pr105324 requires FP from_char Alexandre Oliva
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).