From 7f9951a93479ac0ddd74375fdef92095fb65741b Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Wed, 10 Dec 2025 00:07:28 +0000 Subject: [PATCH] 8373207: Make DeferredStatic class template constant initializable Reviewed-by: jsjolen, stefank, iwalulya --- src/hotspot/share/utilities/deferredStatic.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hotspot/share/utilities/deferredStatic.hpp b/src/hotspot/share/utilities/deferredStatic.hpp index 3a32f920fe8..a37b169803a 100644 --- a/src/hotspot/share/utilities/deferredStatic.hpp +++ b/src/hotspot/share/utilities/deferredStatic.hpp @@ -35,7 +35,7 @@ // object must be explicitly initialized before use. This avoids problems // resulting from the unspecified initialization time and ordering between // different objects that comes from using undeferred objects (the so-called -// "Static Initialization Order Fiasco). +// "Static Initialization Order Fiasco"). // // Once initialized, the object is never destroyed. This avoids similar issues // with the timing and ordering of destruction on normal program exit. @@ -53,7 +53,7 @@ class DeferredStatic { public: NONCOPYABLE(DeferredStatic); - DeferredStatic() + constexpr DeferredStatic() DEBUG_ONLY(: _initialized(false)) { // Do not construct value, on purpose. }