Skip to content

Commit f529dc7

Browse files
author
Cruz Monrreal
authored
Merge pull request #8001 from kjbracey-arm/singletonptr_star
Add * operator to SingletonPtr
2 parents 9472814 + 390f6e7 commit f529dc7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

platform/SingletonPtr.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,16 @@ struct SingletonPtr {
113113
return get();
114114
}
115115

116+
/** Get a reference to the underlying singleton
117+
*
118+
* @returns
119+
* A reference to the singleton
120+
*/
121+
T &operator*()
122+
{
123+
return *get();
124+
}
125+
116126
// This is zero initialized when in global scope
117127
T *_ptr;
118128
// Force data to be 4 byte aligned

0 commit comments

Comments
 (0)