Buffer
Buffer Concept
A Buffer is something in which items can be put and removed. The Buffer concept has very few requirements. It does not require any particular ordering of how the items are stored or in what order they will appear when removed, however, there is typically some sort of ordering policy.
Members
For a type to model the Buffer concept it must have the following members.
| Member | Description |
|---|---|
|
The type of object stored in the Buffer. The value type must be Assignable. |
|
An unsigned integral type for representing the number of objects in the Buffer. |
|
Inserts |
|
Removes an object from the Buffer. |
|
Returns a mutable reference to some object in the Buffer.
Precondition: |
|
Returns a const reference to some object in the
Buffer. Precondition: |
|
Returns the number of objects in the
Buffer. Invariant: |
|
Equivalent to |