attributes.hpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Copyright Oliver Kowalke 2009.
  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. #ifndef BOOST_COROUTINES_ATTRIBUTES_H
  6. #define BOOST_COROUTINES_ATTRIBUTES_H
  7. #include <cstddef>
  8. #include <boost/config.hpp>
  9. #include <boost/coroutine/flags.hpp>
  10. #include <boost/coroutine/stack_allocator.hpp>
  11. #ifdef BOOST_HAS_ABI_HEADERS
  12. # include BOOST_ABI_PREFIX
  13. #endif
  14. namespace boost {
  15. namespace coroutines {
  16. struct attributes
  17. {
  18. std::size_t size;
  19. flag_unwind_t do_unwind;
  20. attributes() BOOST_NOEXCEPT :
  21. size( stack_allocator::traits_type::default_size() ),
  22. do_unwind( stack_unwind)
  23. {}
  24. explicit attributes( std::size_t size_) BOOST_NOEXCEPT :
  25. size( size_),
  26. do_unwind( stack_unwind)
  27. {}
  28. explicit attributes( flag_unwind_t do_unwind_) BOOST_NOEXCEPT :
  29. size( stack_allocator::traits_type::default_size() ),
  30. do_unwind( do_unwind_)
  31. {}
  32. explicit attributes(
  33. std::size_t size_,
  34. flag_unwind_t do_unwind_) BOOST_NOEXCEPT :
  35. size( size_),
  36. do_unwind( do_unwind_)
  37. {}
  38. };
  39. }}
  40. #ifdef BOOST_HAS_ABI_HEADERS
  41. # include BOOST_ABI_SUFFIX
  42. #endif
  43. #endif // BOOST_COROUTINES_ATTRIBUTES_H