[libc++] Fix build with gcc 4.8
gcc 4.8.4 (but not 5.4.0 or 7.3.0) has trouble initializing errc with {}, giving
the error in [1]. This CL switches to explicitly using errc(0), which gcc 4.8
accepts.
[1] https://bugs.chromium.org/p/chromium/issues/detail?id=973723
Differential Revision: https://reviews.llvm.org/D63296
llvm-svn: 363333
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 2ce370c957296b8a9bbde0d0bae98b9f85f3e36e
diff --git a/include/charconv b/include/charconv
index 4e84ef6..a644fe0 100644
--- a/include/charconv
+++ b/include/charconv
@@ -314,7 +314,7 @@
#if !defined(_LIBCPP_COMPILER_MSVC)
if (__tx::digits <= __diff || __tx::__width(__value) <= __diff)
- return {__tx::__convert(__value, __first), {}};
+ return {__tx::__convert(__value, __first), errc(0)};
else
return {__last, errc::value_too_large};
#else