diff --git a/src/Hash.cc b/src/Hash.cc index 0e679296b0..5c90ebd592 100644 --- a/src/Hash.cc +++ b/src/Hash.cc @@ -27,21 +27,20 @@ alignas(16) unsigned long long KeyedHash::shared_siphash_key[2]; // we use the following lines to not pull in the highwayhash headers in Hash.h - but to check the // types did not change underneath us. -static_assert(std::is_same::value, +static_assert(std::is_same_v, "Highwayhash return values must match hash_x_t"); -static_assert(std::is_same::value, +static_assert(std::is_same_v, "Highwayhash return values must match hash_x_t"); -static_assert(std::is_same::value, +static_assert(std::is_same_v, "Highwayhash return values must match hash_x_t"); void KeyedHash::InitializeSeeds(const std::array& seed_data) { - static_assert(std::is_same::value, - "Highwayhash Key is not unsigned long long[2]"); static_assert( - std::is_same::value, - "Highwayhash HHKey is not uint64_t[4]"); + std::is_same_v, + "Highwayhash Key is not unsigned long long[2]"); + static_assert(std::is_same_v, + "Highwayhash HHKey is not uint64_t[4]"); if ( seeds_initialized ) return; diff --git a/src/probabilistic/Hasher.cc b/src/probabilistic/Hasher.cc index 5b20222d10..c8560fd5ed 100644 --- a/src/probabilistic/Hasher.cc +++ b/src/probabilistic/Hasher.cc @@ -108,7 +108,7 @@ UHF::UHF(Hasher::seed_t arg_seed) // times. Hasher::digest UHF::hash(const void* x, size_t n) const { - static_assert(std::is_same::value, + static_assert(std::is_same_v, "Seed value is not the same type as highwayhash key"); return highwayhash::SipHash(seed.h, reinterpret_cast(x), n); } diff --git a/src/threading/BasicThread.cc b/src/threading/BasicThread.cc index 99116786d5..3146533610 100644 --- a/src/threading/BasicThread.cc +++ b/src/threading/BasicThread.cc @@ -49,7 +49,7 @@ void BasicThread::SetName(const char* arg_name) void BasicThread::SetOSName(const char* arg_name) { // Do it only if libc++ supports pthread_t. - if constexpr ( std::is_same::value ) + if constexpr ( std::is_same_v ) zeek::util::detail::set_thread_name(arg_name, reinterpret_cast(thread.native_handle())); }