4
// Permission to use, copy, modify, distribute and sell this software
5
// and its documentation for any purpose is hereby granted without fee,
6
// provided that the above copyright notice appear in all copies and
7
// that both that copyright notice and this permission notice appear
8
// in supporting documentation. Mac Murrett makes no representations
9
// about the suitability of this software for any purpose. It is
10
// provided "as is" without express or implied warranty.
12
// See http://www.boost.org for most recent version including documentation.
14
#ifndef BOOST_SINGLETON_MJM012402_HPP
15
#define BOOST_SINGLETON_MJM012402_HPP
23
// class singleton has the same goal as all singletons: create one instance of a
24
// class on demand, then dish it out as requested.
27
class singleton: private T
39
inline singleton<T>::singleton()
43
inline singleton<T>::~singleton()
48
/*static*/ T &singleton<T>::instance()
50
// function-local static to force this to work correctly at static
51
// initialization time.
52
static singleton<T> s_oT;
64
#endif // BOOST_SINGLETON_MJM012402_HPP