Use C++17 variable templates for type traits

The C++17 variable templates are slightly more readable and allow us to
remove the typename keyword in a few cases.

closes https://github.com/official-stockfish/Stockfish/pull/4806

No functional change
This commit is contained in:
Sebastian Buchwald
2023-09-25 12:24:48 +02:00
committed by Disservin
parent 31d0b7fe93
commit 4f0fecad8a
4 changed files with 11 additions and 11 deletions

View File

@@ -24,7 +24,7 @@
#include <cstdint>
#include <cstdlib>
#include <limits>
#include <type_traits>
#include <type_traits> // IWYU pragma: keep
#include "movegen.h"
#include "types.h"
@@ -70,7 +70,7 @@ struct Stats : public std::array<Stats<T, D, Sizes...>, Size>
void fill(const T& v) {
// For standard-layout 'this' points to first struct member
assert(std::is_standard_layout<stats>::value);
assert(std::is_standard_layout_v<stats>);
using entry = StatsEntry<T, D>;
entry* p = reinterpret_cast<entry*>(this);