We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf78925 commit 42d3604Copy full SHA for 42d3604
src/hotspot/share/utilities/deferred.hpp
@@ -56,14 +56,27 @@ class Deferred {
56
return &_t;
57
}
58
59
+ const T* get() const {
60
+ assert(_initialized, "must be initialized before access");
61
+ return &_t;
62
+ }
63
+
64
T& operator*() {
65
return *get();
66
67
68
+ const T& operator*() const {
69
+ return *get();
70
71
72
T* operator->() {
73
return get();
74
75
76
+ const T* operator->() const {
77
+ return get();
78
79
80
template<typename... Ts>
81
void initialize(Ts&... args) {
82
assert(!_initialized, "Double initialization forbidden");
0 commit comments