diff --git a/src/serialization/binary_archive.h b/src/serialization/binary_archive.h index bbab6ece9..59b63638f 100644 --- a/src/serialization/binary_archive.h +++ b/src/serialization/binary_archive.h @@ -197,7 +197,7 @@ struct binary_archive : public binary_archive_base { for (size_t i = 0; i < sizeof(T); i++) { stream_.put((char)(v & 0xff)); - if (1 < sizeof(T)) v >>= 8; + if constexpr (1 < sizeof(T)) { v >>= 8; } } }