]> git.sesse.net Git - stockfish/blobdiff - src/nnue/nnue_common.h
Use C++17 variable templates for type traits
[stockfish] / src / nnue / nnue_common.h
index a42a86c980d8fb69047a3ecc871bfdf098634df2..e159c5dc3dac0f0300e572a9985404bc4b9fadde 100644 (file)
@@ -103,7 +103,7 @@ namespace Stockfish::Eval::NNUE {
       else
       {
           std::uint8_t u[sizeof(IntType)];
-          typename std::make_unsigned<IntType>::type v = 0;
+          std::make_unsigned_t<IntType> v = 0;
 
           stream.read(reinterpret_cast<char*>(u), sizeof(IntType));
           for (std::size_t i = 0; i < sizeof(IntType); ++i)
@@ -128,7 +128,7 @@ namespace Stockfish::Eval::NNUE {
       else
       {
           std::uint8_t u[sizeof(IntType)];
-          typename std::make_unsigned<IntType>::type v = value;
+          std::make_unsigned_t<IntType> v = value;
 
           std::size_t i = 0;
           // if constexpr to silence the warning about shift by 8