Commit 0014024a authored by Victor Zverovich's avatar Victor Zverovich

Don't rely on transitive includes

parent c2850055
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#include <algorithm> #include <algorithm>
#include <chrono> #include <chrono>
#include <cmath> // std::isfinite
#include <cstring> // std::memcpy
#include <ctime> #include <ctime>
#include <iterator> #include <iterator>
#include <locale> #include <locale>
...@@ -561,10 +563,10 @@ inline void write_digit2_separated(char* buf, unsigned a, unsigned b, ...@@ -561,10 +563,10 @@ inline void write_digit2_separated(char* buf, unsigned a, unsigned b,
constexpr const size_t len = 8; constexpr const size_t len = 8;
if (const_check(is_big_endian())) { if (const_check(is_big_endian())) {
char tmp[len]; char tmp[len];
memcpy(tmp, &digits, len); std::memcpy(tmp, &digits, len);
std::reverse_copy(tmp, tmp + len, buf); std::reverse_copy(tmp, tmp + len, buf);
} else { } else {
memcpy(buf, &digits, len); std::memcpy(buf, &digits, len);
} }
} }
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <cmath> // std::signbit #include <cmath> // std::signbit
#include <cstdint> // uint32_t #include <cstdint> // uint32_t
#include <cstring> // std::memcpy
#include <limits> // std::numeric_limits #include <limits> // std::numeric_limits
#include <memory> // std::uninitialized_copy #include <memory> // std::uninitialized_copy
#include <stdexcept> // std::runtime_error #include <stdexcept> // std::runtime_error
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment