diff options
author | bunnei <bunneidev@gmail.com> | 2018-08-08 21:28:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-08 21:28:34 +0200 |
commit | d224eb7c39c43754929972d07998db79ba093279 (patch) | |
tree | 4059c27a33d3595cfc37f6316a4e29290221e3d3 /src/common/hash.h | |
parent | Merge pull request #850 from DarkLordZach/icon-meta (diff) | |
parent | common: Convert type traits templates over to variable template versions where applicable (diff) | |
download | yuzu-d224eb7c39c43754929972d07998db79ba093279.tar yuzu-d224eb7c39c43754929972d07998db79ba093279.tar.gz yuzu-d224eb7c39c43754929972d07998db79ba093279.tar.bz2 yuzu-d224eb7c39c43754929972d07998db79ba093279.tar.lz yuzu-d224eb7c39c43754929972d07998db79ba093279.tar.xz yuzu-d224eb7c39c43754929972d07998db79ba093279.tar.zst yuzu-d224eb7c39c43754929972d07998db79ba093279.zip |
Diffstat (limited to 'src/common/hash.h')
-rw-r--r-- | src/common/hash.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/hash.h b/src/common/hash.h index 73c326980..2c761e545 100644 --- a/src/common/hash.h +++ b/src/common/hash.h @@ -28,7 +28,7 @@ static inline u64 ComputeHash64(const void* data, size_t len) { */ template <typename T> static inline u64 ComputeStructHash64(const T& data) { - static_assert(std::is_trivially_copyable<T>(), + static_assert(std::is_trivially_copyable_v<T>, "Type passed to ComputeStructHash64 must be trivially copyable"); return ComputeHash64(&data, sizeof(data)); } @@ -38,7 +38,7 @@ template <typename T> struct HashableStruct { // In addition to being trivially copyable, T must also have a trivial default constructor, // because any member initialization would be overridden by memset - static_assert(std::is_trivial<T>(), "Type passed to HashableStruct must be trivial"); + static_assert(std::is_trivial_v<T>, "Type passed to HashableStruct must be trivial"); /* * We use a union because "implicitly-defined copy/move constructor for a union X copies the * object representation of X." and "implicitly-defined copy assignment operator for a union X |