no_locking.hpp 803 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* Copyright 2006-2008 Joaquin M Lopez Munoz.
  2. * Distributed under the Boost Software License, Version 1.0.
  3. * (See accompanying file LICENSE_1_0.txt or copy at
  4. * http://www.boost.org/LICENSE_1_0.txt)
  5. *
  6. * See http://www.boost.org/libs/flyweight for library home page.
  7. */
  8. #ifndef BOOST_FLYWEIGHT_NO_LOCKING_HPP
  9. #define BOOST_FLYWEIGHT_NO_LOCKING_HPP
  10. #if defined(_MSC_VER)
  11. #pragma once
  12. #endif
  13. #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
  14. #include <boost/flyweight/no_locking_fwd.hpp>
  15. #include <boost/flyweight/locking_tag.hpp>
  16. /* null locking policy */
  17. namespace boost{
  18. namespace flyweights{
  19. struct no_locking:locking_marker
  20. {
  21. struct mutex_type{};
  22. typedef mutex_type lock_type;
  23. };
  24. } /* namespace flyweights */
  25. } /* namespace boost */
  26. #endif