baudvine::RingBuf
STL-like ring buffer in C++11
baudvine Namespace Reference

The baudvine "project". More...

Classes

class  DequeRingBuf
 
class  RingBuf
 An STL-like ring buffer with dynamic allocation and compile-time capacity limits. More...
 

Functions

template<typename Ptr , typename AllocTraits , std::size_t Capacity, typename OutputIt >
OutputIt copy (const detail::ringbuf::Iterator< Ptr, AllocTraits, Capacity > &begin, const detail::ringbuf::Iterator< Ptr, AllocTraits, Capacity > &end, OutputIt out)
 Copy the elements in the range [begin, end) to a destination range starting at out. More...
 

Detailed Description

The baudvine "project".

Function Documentation

◆ copy()

template<typename Ptr , typename AllocTraits , std::size_t Capacity, typename OutputIt >
OutputIt baudvine::copy ( const detail::ringbuf::Iterator< Ptr, AllocTraits, Capacity > &  begin,
const detail::ringbuf::Iterator< Ptr, AllocTraits, Capacity > &  end,
OutputIt  out 
)

Copy the elements in the range [begin, end) to a destination range starting at out.

Can be used like std::copy:

std::vector<int> vec;
baudvine::copy(ring.begin(), ring.end(), std::back_inserter(vec));
Template Parameters
PtrThe pointer type of the input iterator.
AllocTraitsThe allocator traits of the input iterator.
CapacityThe capacity of the input iterator.
Parameters
beginStart of the source range.
endEnd of the source range, one past the last element to copy.
outStart of the destination range.
Returns
One past the last copied element in the destination range.

Definition at line 967 of file ringbuf.h.

baudvine::copy
OutputIt copy(const detail::ringbuf::Iterator< Ptr, AllocTraits, Capacity > &begin, const detail::ringbuf::Iterator< Ptr, AllocTraits, Capacity > &end, OutputIt out)
Copy the elements in the range [begin, end) to a destination range starting at out.
Definition: ringbuf.h:967