Furrent
src
util
singleton.hpp
Go to the documentation of this file.
1
#pragma once
2
3
namespace
fur::util
{
4
5
template
<
typename
T>
6
class
Singleton
{
7
public
:
9
static
T&
instance
();
10
11
public
:
12
Singleton
() =
default
;
13
14
// Don't allow copy and move constructors/assignments!
15
Singleton
(
const
Singleton
&) =
delete
;
16
Singleton
&
operator=
(
const
Singleton
&) =
delete
;
17
Singleton
(
Singleton
&&) noexcept =
delete
;
18
Singleton
&
operator=
(
Singleton
&&) noexcept =
delete
;
19
};
20
21
}
// namespace fur::util
22
23
#include <
util/singleton.inl
>
fur::util::Singleton::operator=
Singleton & operator=(const Singleton &)=delete
fur::util::Singleton::instance
static T & instance()
Returns the instance of the singleton.
Definition:
singleton.inl:6
fur::util::Singleton
Definition:
singleton.hpp:6
fur::util::Singleton::Singleton
Singleton()=default
fur::util
Definition:
result.hpp:12
singleton.inl
Generated by
1.8.17