scoped_allocator_fwd.hpp 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // (C) Copyright Ion Gaztanaga 2011-2012. 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_ALLOCATOR_SCOPED_ALLOCATOR_FWD_HPP
  11. #define BOOST_CONTAINER_ALLOCATOR_SCOPED_ALLOCATOR_FWD_HPP
  12. #if defined(_MSC_VER)
  13. # pragma once
  14. #endif
  15. #include <boost/container/detail/config_begin.hpp>
  16. #include <boost/container/detail/workaround.hpp>
  17. #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
  18. #include <boost/container/detail/preprocessor.hpp>
  19. #include <boost/container/detail/type_traits.hpp>
  20. #endif
  21. namespace boost { namespace container {
  22. ///@cond
  23. #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
  24. #if !defined(BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST)
  25. template <typename OuterAlloc, typename ...InnerAllocs>
  26. class scoped_allocator_adaptor;
  27. #else // #if !defined(BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST)
  28. template <typename ...InnerAllocs>
  29. class scoped_allocator_adaptor;
  30. template <typename OuterAlloc, typename ...InnerAllocs>
  31. class scoped_allocator_adaptor<OuterAlloc, InnerAllocs...>;
  32. #endif // #if !defined(BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST)
  33. #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
  34. template <typename OuterAlloc
  35. BOOST_PP_ENUM_TRAILING( BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
  36. , BOOST_CONTAINER_PP_TEMPLATE_PARAM_WITH_DEFAULT, container_detail::nat)
  37. >
  38. class scoped_allocator_adaptor;
  39. #endif
  40. ///@endcond
  41. //! The allocator_arg_t struct is an empty structure type used as a unique type to
  42. //! disambiguate constructor and function overloading. Specifically, several types
  43. //! have constructors with allocator_arg_t as the first argument, immediately followed
  44. //! by an argument of a type that satisfies the Allocator requirements
  45. struct allocator_arg_t{};
  46. //! A instance of type allocator_arg_t
  47. //!
  48. static const allocator_arg_t allocator_arg = allocator_arg_t();
  49. template <class T>
  50. struct constructible_with_allocator_suffix;
  51. template <class T>
  52. struct constructible_with_allocator_prefix;
  53. template <typename T, typename Alloc>
  54. struct uses_allocator;
  55. }} // namespace boost { namespace container {
  56. #include <boost/container/detail/config_end.hpp>
  57. #endif // BOOST_CONTAINER_ALLOCATOR_SCOPED_ALLOCATOR_FWD_HPP