[libcxx-commits] [PATCH] D92875: [libc++] Include C++ headers, not C headers, in <charconv>

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 10 19:03:56 PST 2020


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb12ea0652129: [libc++] Include C++ headers, not C headers, in <charconv>. (authored by arthur.j.odwyer).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92875/new/

https://reviews.llvm.org/D92875

Files:
  libcxx/include/charconv


Index: libcxx/include/charconv
===================================================================
--- libcxx/include/charconv
+++ libcxx/include/charconv
@@ -76,11 +76,11 @@
 #include <__config>
 #include <__availability>
 #include <__errc>
-#include <type_traits>
+#include <cmath> // for log2f
+#include <cstdint>
+#include <cstring>
 #include <limits>
-#include <stdint.h>
-#include <string.h>
-#include <math.h>
+#include <type_traits>
 
 #include <__debug>
 
@@ -333,7 +333,7 @@
         auto __len = __p - __buf;
         if (__len <= __diff)
         {
-            memcpy(__first, __buf, __len);
+            _VSTD::memcpy(__first, __buf, __len);
             return {__first + __len, {}};
         }
         else
@@ -382,7 +382,7 @@
         return {__last, errc::value_too_large};
     else
     {
-        memmove(__first, __p, __len);
+        _VSTD::memmove(__first, __p, __len);
         return {__first + __len, {}};
     }
 }
@@ -429,7 +429,7 @@
         if (__x <= __complement(__to_unsigned(__tl::min())))
         {
             __x = __complement(__x);
-            memcpy(&__value, &__x, sizeof(__x));
+            _VSTD::memcpy(&__value, &__x, sizeof(__x));
             return __r;
         }
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92875.311090.patch
Type: text/x-patch
Size: 1225 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201211/f911ce10/attachment.bin>


More information about the libcxx-commits mailing list