Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion util/env_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,8 @@ 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,
"SingletonEnv<EnvType> is not a standard layout type");
static_assert(
offsetof(SingletonEnv<EnvType>, env_storage_) % alignof(EnvType) == 0,
"env_storage_ does not meet the Env's alignment needs");
Expand Down
3 changes: 2 additions & 1 deletion util/env_windows.cc
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,8 @@ 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,
"SingletonEnv<EnvType is not a standard layout type");
static_assert(
offsetof(SingletonEnv<EnvType>, env_storage_) % alignof(EnvType) == 0,
"env_storage_ does not meet the Env's alignment needs");
Expand Down
3 changes: 2 additions & 1 deletion util/no_destructor.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ 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,
"NoDestructor<InstanceType> is not a standard layout type");
static_assert(
offsetof(NoDestructor, instance_storage_) % alignof(InstanceType) == 0,
"instance_storage_ does not meet the instance's alignment requirement");
Expand Down