mirror of
https://github.com/google/leveldb.git
synced 2025-04-25 14:00:27 +08:00
Changed std::is_standard_layout_v to std::is_standard_layout in SingletonEnv
Replaced the C++17 variable template alias with the C++11 compatible syntax (::value) in the static assertions. This change makes the program capable of building under C++11 constraints while preserving the intended compile-time checks.
This commit is contained in:
parent
bba74b2a4e
commit
4a8acc1006
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user