mirror of
https://github.com/google/leveldb.git
synced 2025-04-25 14:00:27 +08:00
Fix compilation errors with C++17 feature
This commit is contained in:
parent
ac691084fd
commit
77f366acef
@ -874,7 +874,7 @@ class SingletonEnv {
|
||||
#endif // !defined(NDEBUG)
|
||||
static_assert(sizeof(env_storage_) >= sizeof(EnvType),
|
||||
"env_storage_ will not fit the Env");
|
||||
static_assert(std::is_standard_layout_v<SingletonEnv<EnvType>>);
|
||||
static_assert(std::is_standard_layout<SingletonEnv<EnvType>>::value);
|
||||
static_assert(
|
||||
offsetof(SingletonEnv<EnvType>, env_storage_) % alignof(EnvType) == 0,
|
||||
"env_storage_ does not meet the Env's alignment needs");
|
||||
|
@ -769,7 +769,7 @@ class SingletonEnv {
|
||||
#endif // !defined(NDEBUG)
|
||||
static_assert(sizeof(env_storage_) >= sizeof(EnvType),
|
||||
"env_storage_ will not fit the Env");
|
||||
static_assert(std::is_standard_layout_v<SingletonEnv<EnvType>>);
|
||||
static_assert(std::is_standard_layout<SingletonEnv<EnvType>>::value);
|
||||
static_assert(
|
||||
offsetof(SingletonEnv<EnvType>, env_storage_) % alignof(EnvType) == 0,
|
||||
"env_storage_ does not meet the Env's alignment needs");
|
||||
|
@ -21,7 +21,7 @@ class NoDestructor {
|
||||
explicit NoDestructor(ConstructorArgTypes&&... constructor_args) {
|
||||
static_assert(sizeof(instance_storage_) >= sizeof(InstanceType),
|
||||
"instance_storage_ is not large enough to hold the instance");
|
||||
static_assert(std::is_standard_layout_v<NoDestructor<InstanceType>>);
|
||||
static_assert(std::is_standard_layout<NoDestructor<InstanceType>>::value);
|
||||
static_assert(
|
||||
offsetof(NoDestructor, instance_storage_) % alignof(InstanceType) == 0,
|
||||
"instance_storage_ does not meet the instance's alignment requirement");
|
||||
|
Loading…
Reference in New Issue
Block a user