From b12ea0652129da3b42642a0b76adbfab8833db53 Mon Sep 17 00:00:00 2001 From: Arthur O'Dwyer Date: Mon, 7 Dec 2020 21:45:29 -0500 Subject: [PATCH] [libc++] Include C++ headers, not C headers, in . This matches how libc++ does it in all other C++ headers (that is, headers not ending in ".h"). We need to include if we want to use `_VSTD::memmove` instead of unqualified ADL `memmove`. Even though ADL doesn't physically matter in 's specific case, I'm trying to migrate libc++ to using `_VSTD::memmove` for all cases (because some of them do matter, and this way it's easier to grep for outliers). Differential Revision: https://reviews.llvm.org/D92875 --- libcxx/include/charconv | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libcxx/include/charconv b/libcxx/include/charconv index 4664f5b..4666c5c 100644 --- a/libcxx/include/charconv +++ b/libcxx/include/charconv @@ -76,11 +76,11 @@ namespace std { #include <__config> #include <__availability> #include <__errc> -#include +#include // for log2f +#include +#include #include -#include -#include -#include +#include #include <__debug> @@ -333,7 +333,7 @@ __to_chars_itoa(char* __first, char* __last, _Tp __value, false_type) auto __len = __p - __buf; if (__len <= __diff) { - memcpy(__first, __buf, __len); + _VSTD::memcpy(__first, __buf, __len); return {__first + __len, {}}; } else @@ -382,7 +382,7 @@ __to_chars_integral(char* __first, char* __last, _Tp __value, int __base, return {__last, errc::value_too_large}; else { - memmove(__first, __p, __len); + _VSTD::memmove(__first, __p, __len); return {__first + __len, {}}; } } @@ -429,7 +429,7 @@ __sign_combinator(_It __first, _It __last, _Tp& __value, _Fn __f, _Ts... __args) if (__x <= __complement(__to_unsigned(__tl::min()))) { __x = __complement(__x); - memcpy(&__value, &__x, sizeof(__x)); + _VSTD::memcpy(&__value, &__x, sizeof(__x)); return __r; } } -- 2.7.4