allocation_type.hpp 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
  4. // Software License, Version 1.0. (See accompanying file
  5. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // See http://www.boost.org/libs/container for documentation.
  8. //
  9. ///////////////////////////////////////////////////////////////////////////////
  10. #ifndef BOOST_CONTAINER_ALLOCATION_TYPE_HPP
  11. #define BOOST_CONTAINER_ALLOCATION_TYPE_HPP
  12. #ifndef BOOST_CONFIG_HPP
  13. # include <boost/config.hpp>
  14. #endif
  15. #if defined(BOOST_HAS_PRAGMA_ONCE)
  16. # pragma once
  17. #endif
  18. #include <boost/container/detail/config_begin.hpp>
  19. #include <boost/container/detail/workaround.hpp>
  20. namespace boost {
  21. namespace container {
  22. #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
  23. enum allocation_type_v
  24. {
  25. // constants for allocation commands
  26. allocate_new_v = 0x01,
  27. expand_fwd_v = 0x02,
  28. expand_bwd_v = 0x04,
  29. // expand_both = expand_fwd | expand_bwd,
  30. // expand_or_new = allocate_new | expand_both,
  31. shrink_in_place_v = 0x08,
  32. nothrow_allocation_v = 0x10,
  33. zero_memory_v = 0x20,
  34. try_shrink_in_place_v = 0x40
  35. };
  36. typedef unsigned int allocation_type;
  37. #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
  38. static const allocation_type allocate_new = (allocation_type)allocate_new_v;
  39. static const allocation_type expand_fwd = (allocation_type)expand_fwd_v;
  40. static const allocation_type expand_bwd = (allocation_type)expand_bwd_v;
  41. static const allocation_type shrink_in_place = (allocation_type)shrink_in_place_v;
  42. static const allocation_type try_shrink_in_place= (allocation_type)try_shrink_in_place_v;
  43. static const allocation_type nothrow_allocation = (allocation_type)nothrow_allocation_v;
  44. static const allocation_type zero_memory = (allocation_type)zero_memory_v;
  45. } //namespace container {
  46. } //namespace boost {
  47. #include <boost/container/detail/config_end.hpp>
  48. #endif //BOOST_CONTAINER_ALLOCATION_TYPE_HPP