lockfree_forward.hpp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // Copyright (C) 2008-2016 Tim Blechmann
  2. //
  3. // Distributed under the Boost Software License, Version 1.0. (See
  4. // accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. #ifndef BOOST_LOCKFREE_FORWARD_HPP_INCLUDED
  7. #define BOOST_LOCKFREE_FORWARD_HPP_INCLUDED
  8. #include <boost/config.hpp>
  9. #ifdef BOOST_HAS_PRAGMA_ONCE
  10. # pragma once
  11. #endif
  12. #ifndef BOOST_DOXYGEN_INVOKED
  13. # include <cstddef>
  14. # if !defined( BOOST_NO_CXX20_HDR_CONCEPTS )
  15. # include <type_traits>
  16. # endif
  17. namespace boost { namespace lockfree {
  18. // policies
  19. template < bool IsFixedSized >
  20. struct fixed_sized;
  21. template < size_t Size >
  22. struct capacity;
  23. template < class Alloc >
  24. struct allocator;
  25. // data structures
  26. template < typename T, typename... Options >
  27. # if !defined( BOOST_NO_CXX20_HDR_CONCEPTS )
  28. requires( std::is_copy_assignable_v< T >,
  29. std::is_trivially_copy_assignable_v< T >,
  30. std::is_trivially_destructible_v< T > )
  31. # endif
  32. class queue;
  33. template < typename T, typename... Options >
  34. # if !defined( BOOST_NO_CXX20_HDR_CONCEPTS )
  35. requires( std::is_copy_assignable_v< T > || std::is_move_assignable_v< T > )
  36. # endif
  37. class stack;
  38. template < typename T, typename... Options >
  39. # if !defined( BOOST_NO_CXX20_HDR_CONCEPTS )
  40. requires( std::is_default_constructible_v< T >, std::is_move_assignable_v< T > || std::is_copy_assignable_v< T > )
  41. # endif
  42. class spsc_queue;
  43. template < typename T, typename... Options >
  44. struct spsc_value;
  45. }} // namespace boost::lockfree
  46. #endif // BOOST_DOXYGEN_INVOKED
  47. #endif // BOOST_LOCKFREE_FORWARD_HPP_INCLUDED