Banuba SDK
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
bnb::singleton< T > Class Template Reference

Base class for all scoped singletons. More...

#include <singleton.hpp>

Public Member Functions

 singleton (const singleton< T > &other)=delete
 
singleton< T > & operator= (const singleton< T > &other)=delete
 

Static Public Member Functions

static T & instance ()
 

Detailed Description

template<typename T>
class bnb::singleton< T >

Base class for all scoped singletons.

This is a Meyers Singleton implementation.

Definition at line 17 of file singleton.hpp.

Member Function Documentation

◆ instance()

template<typename T >
static T & bnb::singleton< T >::instance ( )
inlinestatic

Definition at line 23 of file singleton.hpp.

24 {
25 static T instance;
26 return instance;
27 }

The documentation for this class was generated from the following file: