static_assert(std::tuple_size<Hash::Digest>() == 20,
"Increment version number if size of digest is changed.");
-static_assert(std::is_trivially_copyable<Hash::Digest>::value,
+static_assert(std::is_trivially_copyable_v<Hash::Digest>,
"Digest is expected to be trivially copyable.");
static_assert(
read_file(const fs::path& path, size_t size_hint)
{
const int open_flags = [] {
- if constexpr (std::is_same<T, std::string>::value) {
+ if constexpr (std::is_same_v<T, std::string>) {
return O_RDONLY | O_TEXT;
} else {
return O_RDONLY | O_BINARY;
result.resize(pos);
#ifdef _WIN32
- if constexpr (std::is_same<T, std::string>::value) {
+ if constexpr (std::is_same_v<T, std::string>) {
// Convert to UTF-8 if the content starts with a UTF-16 little-endian BOM.
if (has_utf16_le_bom(result)) {
result.erase(0, 2); // Remove BOM.