Don't rely on transitive includes

This commit is contained in:
Victor Zverovich 2022-01-21 15:03:28 -08:00
parent c28500556a
commit 0014024a2c
2 changed files with 5 additions and 2 deletions

View File

@ -10,6 +10,8 @@
#include <algorithm>
#include <chrono>
#include <cmath> // std::isfinite
#include <cstring> // std::memcpy
#include <ctime>
#include <iterator>
#include <locale>
@ -561,10 +563,10 @@ inline void write_digit2_separated(char* buf, unsigned a, unsigned b,
constexpr const size_t len = 8;
if (const_check(is_big_endian())) {
char tmp[len];
memcpy(tmp, &digits, len);
std::memcpy(tmp, &digits, len);
std::reverse_copy(tmp, tmp + len, buf);
} else {
memcpy(buf, &digits, len);
std::memcpy(buf, &digits, len);
}
}

View File

@ -35,6 +35,7 @@
#include <cmath> // std::signbit
#include <cstdint> // uint32_t
#include <cstring> // std::memcpy
#include <limits> // std::numeric_limits
#include <memory> // std::uninitialized_copy
#include <stdexcept> // std::runtime_error