Update contrib.
1 // Copyright (C) 2001-2003
4 // Distributed under the Boost Software License, Version 1.0. (See
5 // accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
8 // See http://www.boost.org for most recent version including documentation.
10 #ifndef BOOST_SINGLETON_MJM012402_HPP
11 #define BOOST_SINGLETON_MJM012402_HPP
13 #include <boost/thread/detail/config.hpp>
19 // class singleton has the same goal as all singletons: create one instance of
20 // a class on demand, then dish it out as requested.
23 class singleton : private T
35 inline singleton<T>::singleton()
41 inline singleton<T>::~singleton()
47 /*static*/ T &singleton<T>::instance()
49 // function-local static to force this to work correctly at static
50 // initialization time.
51 static singleton<T> s_oT;
59 #endif // BOOST_SINGLETON_MJM012402_HPP