Merge pull request #8001 from kjbracey-arm/singletonptr_star

Add * operator to SingletonPtr
pull/7948/head
Cruz Monrreal 2018-10-08 10:25:46 -05:00 committed by GitHub
commit f529dc799e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -113,6 +113,16 @@ struct SingletonPtr {
return get();
}
/** Get a reference to the underlying singleton
*
* @returns
* A reference to the singleton
*/
T &operator*()
{
return *get();
}
// This is zero initialized when in global scope
T *_ptr;
// Force data to be 4 byte aligned