no_tracking.hpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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_TRACKING_HPP
  9. #define BOOST_FLYWEIGHT_NO_TRACKING_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_tracking_fwd.hpp>
  15. #include <boost/flyweight/tracking_tag.hpp>
  16. /* Null tracking policy: elements are never erased from the factory.
  17. */
  18. namespace boost{
  19. namespace flyweights{
  20. struct no_tracking:tracking_marker
  21. {
  22. struct entry_type
  23. {
  24. template<typename Value,typename Key>
  25. struct apply{typedef Value type;};
  26. };
  27. struct handle_type
  28. {
  29. template<typename Handle,typename TrackingHelper>
  30. struct apply{typedef Handle type;};
  31. };
  32. };
  33. } /* namespace flyweights */
  34. } /* namespace boost */
  35. #endif