pod_singleton.hpp 530 B

1234567891011121314151617181920
  1. // Copyright David Abrahams 2006. Distributed under the Boost
  2. // Software License, Version 1.0. (See accompanying
  3. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. #ifndef BOOST_DETAIL_POD_SINGLETON_DWA200655_HPP
  5. # define BOOST_DETAIL_POD_SINGLETON_DWA200655_HPP
  6. namespace boost { namespace detail {
  7. template<typename T>
  8. struct pod_singleton
  9. {
  10. static T instance;
  11. };
  12. template<typename T>
  13. T pod_singleton<T>::instance;
  14. }} // namespace boost::detail
  15. #endif // BOOST_DETAIL_POD_SINGLETON_DWA200655_HPP