StaticRingBuffer.length

current amount of elements used in the buffer

struct StaticRingBuffer(size_t size, T)
@property const nothrow
size_t
length
()

Examples

{
	StaticRingBuffer!(2, int) foo;

	assert(foo.length == 0);

	foo ~= 1;

	assert(foo.length == 1);

	foo ~= 1;

	assert(foo.length == 2);

	// append but let first element drop out
	foo ~= 1;

	assert(foo.length == 2)

Meta