lock_traits.hpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Distributed under the Boost Software License, Version 1.0. (See
  2. // accompanying file LICENSE_1_0.txt or copy at
  3. // http://www.boost.org/LICENSE_1_0.txt)
  4. // (C) Copyright 2009-2012 Vicente J. Botet Escriba
  5. #ifndef BOOST_THREAD_LOCK_TRAITS_HPP
  6. #define BOOST_THREAD_LOCK_TRAITS_HPP
  7. #include <boost/thread/detail/config.hpp>
  8. //#include <boost/thread/detail/move.hpp>
  9. //#include <boost/thread/exceptions.hpp>
  10. //
  11. //#ifdef BOOST_THREAD_USES_CHRONO
  12. //#include <boost/chrono/time_point.hpp>
  13. //#include <boost/chrono/duration.hpp>
  14. //#endif
  15. #include <boost/type_traits/integral_constant.hpp>
  16. #include <boost/config/abi_prefix.hpp>
  17. namespace boost
  18. {
  19. /**
  20. * An strict lock is a lock ensuring the mutex is locked on the scope of the lock
  21. * There is no single way to define a strict lock as the strict_lock and
  22. * nesteed_strict_lock shows. So we need a metafunction that states if a
  23. * lock is a strict lock "sur parole".
  24. */
  25. template <typename Lock>
  26. struct is_strict_lock_sur_parolle : false_type {};
  27. template <typename Lock>
  28. struct is_strict_lock_sur_parole : is_strict_lock_sur_parolle<Lock> {};
  29. template <typename Lock>
  30. struct is_strict_lock : is_strict_lock_sur_parole<Lock> {};
  31. }
  32. #include <boost/config/abi_suffix.hpp>
  33. #endif