diff --git a/util/env_posix.cc b/util/env_posix.cc index 57c19ec70..c2490322e 100644 --- a/util/env_posix.cc +++ b/util/env_posix.cc @@ -880,7 +880,7 @@ class SingletonEnv { "env_storage_ does not meet the Env's alignment needs"); static_assert(alignof(SingletonEnv) % alignof(EnvType) == 0, "env_storage_ does not meet the Env's alignment needs"); - new (&env_storage_) EnvType(); + new (env_storage_) EnvType(); } ~SingletonEnv() = default; diff --git a/util/env_windows.cc b/util/env_windows.cc index e0a19cc5e..ae5149a50 100644 --- a/util/env_windows.cc +++ b/util/env_windows.cc @@ -775,7 +775,7 @@ class SingletonEnv { "env_storage_ does not meet the Env's alignment needs"); static_assert(alignof(SingletonEnv) % alignof(EnvType) == 0, "env_storage_ does not meet the Env's alignment needs"); - new (&env_storage_) EnvType(); + new (env_storage_) EnvType(); } ~SingletonEnv() = default; diff --git a/util/no_destructor.h b/util/no_destructor.h index 08ce6a40a..c28a10731 100644 --- a/util/no_destructor.h +++ b/util/no_destructor.h @@ -28,7 +28,7 @@ class NoDestructor { static_assert( alignof(NoDestructor) % alignof(InstanceType) == 0, "instance_storage_ does not meet the instance's alignment requirement"); - new (&instance_storage_) + new (instance_storage_) InstanceType(std::forward(constructor_args)...); }