1 // Forward declaration of the circular buffer and its adaptor. 2 3 // Copyright (c) 2003 4 // Jan Gaspar, Whitestein Technologies 5 6 // Permission to use or copy this software for any purpose is hereby granted 7 // without fee, provided the above notices are retained on all copies. 8 // Permission to modify the code and to distribute modified code is granted, 9 // provided the above notices are retained, and a notice that the code was 10 // modified is included with the above copyright notice. 11 12 // This material is provided "as is", with absolutely no warranty expressed 13 // or implied. Any use is at your own risk. 14 15 #if !defined(BOOST_CIRCULAR_BUFFER_FWD_HPP) 16 #define BOOST_CIRCULAR_BUFFER_FWD_HPP 17 18 #include <boost/config.hpp> 19 #include <vector> 20 21 namespace boost { 22 23 // Definition of the default allocator (needed because of non-standard 24 // default allocator in some STL implementations e.g. SGI STL). 25 #if !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) 26 #define BOOST_CB_DEFAULT_ALLOCATOR(T) typename std::vector<T>::allocator_type 27 #else 28 #define BOOST_CB_DEFAULT_ALLOCATOR(T) std::vector<T>::allocator_type 29 #endif 30 31 template <class T, class Alloc = BOOST_CB_DEFAULT_ALLOCATOR(T)> 32 class circular_buffer; 33 34 template <class T, class Alloc = BOOST_CB_DEFAULT_ALLOCATOR(T)> 35 class circular_buffer_space_optimized; 36 37 #undef BOOST_CB_DEFAULT_ALLOCATOR 38 39 } // namespace boost 40 41 #endif // #if !defined(BOOST_CIRCULAR_BUFFER_FWD_HPP) 42