circular_buffer_fwd.hpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Forward declaration of the circular buffer and its adaptor.
  2. // Copyright (c) 2003-2008 Jan Gaspar
  3. // Use, modification, and distribution is subject to the Boost Software
  4. // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. // See www.boost.org/libs/circular_buffer for documentation.
  7. #if !defined(BOOST_CIRCULAR_BUFFER_FWD_HPP)
  8. #define BOOST_CIRCULAR_BUFFER_FWD_HPP
  9. #if defined(_MSC_VER)
  10. #pragma once
  11. #endif
  12. #include <boost/config.hpp>
  13. #if !defined(BOOST_NO_STD_ALLOCATOR)
  14. #include <memory>
  15. #else
  16. #include <vector>
  17. #endif
  18. namespace boost {
  19. #if !defined(BOOST_NO_STD_ALLOCATOR)
  20. #define BOOST_CB_DEFAULT_ALLOCATOR(T) std::allocator<T>
  21. #else
  22. #define BOOST_CB_DEFAULT_ALLOCATOR(T) BOOST_DEDUCED_TYPENAME std::vector<T>::allocator_type
  23. #endif
  24. template <class T, class Alloc = BOOST_CB_DEFAULT_ALLOCATOR(T)>
  25. class circular_buffer;
  26. template <class T, class Alloc = BOOST_CB_DEFAULT_ALLOCATOR(T)>
  27. class circular_buffer_space_optimized;
  28. #undef BOOST_CB_DEFAULT_ALLOCATOR
  29. } // namespace boost
  30. #endif // #if !defined(BOOST_CIRCULAR_BUFFER_FWD_HPP)