mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 02:57:11 +08:00
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:
committed by
Disservin
parent
31d0b7fe93
commit
4f0fecad8a
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user