#include <bn_array.h>
template<typename Type>
array<Type, 0> class
Empty array template specialization.
Template parameters | |
---|---|
Type | Element type. |
Public types
- using value_type = Type
- Value type alias.
- using size_type = int
- Size type alias.
- using difference_type = int
- Difference type alias.
- using reference = Type&
- Reference alias.
- using const_reference = const Type&
- Const reference alias.
- using pointer = Type*
- Pointer alias.
- using const_pointer = const Type*
- Const pointer alias.
- using iterator = Type*
- Iterator alias.
- using const_iterator = const Type*
- Const iterator alias.
- using reverse_iterator = bn::reverse_iterator<iterator>
- Reverse iterator alias.
-
using const_reverse_iterator = bn::reverse_iterator<const_
iterator> - Const reverse iterator alias.
Public functions
-
auto data() const -> const_
pointer constexpr - Returns a const pointer to the beginning of the array.
- auto data() -> pointer constexpr
- Returns a pointer to the beginning of the array.
-
auto size() const -> size_
type constexpr - Returns the elements count.
-
auto max_size() const -> size_
type constexpr - Returns the maximum possible elements count.
-
auto available() const -> size_
type constexpr - Returns the remaining element capacity.
- auto empty() const -> bool constexpr
- Indicates if it doesn't contain any element.
- auto full() const -> bool constexpr
- Indicates if it can't contain any more elements.
-
auto begin() const -> const_
iterator constexpr - Returns a const iterator to the beginning of the array.
- auto begin() -> iterator constexpr
- Returns an iterator to the beginning of the array.
-
auto end() const -> const_
iterator constexpr - Returns a const iterator to the end of the array.
- auto end() -> iterator constexpr
- Returns an iterator to the end of the array.
-
auto cbegin() const -> const_
iterator constexpr - Returns a const iterator to the beginning of the array.
-
auto cend() const -> const_
iterator constexpr - Returns a const iterator to the end of the array.
-
auto rbegin() const -> const_
reverse_ iterator constexpr - Returns a const reverse iterator to the end of the array.
-
auto rbegin() -> reverse_
iterator constexpr - Returns a reverse iterator to the end of the array.
-
auto rend() const -> const_
reverse_ iterator constexpr - Returns a const reverse iterator to the beginning of the array.
-
auto rend() -> reverse_
iterator constexpr - Returns a reverse iterator to the beginning of the array.
-
auto crbegin() const -> const_
reverse_ iterator constexpr - Returns a const reverse iterator to the end of the array.
-
auto crend() const -> const_
reverse_ iterator constexpr - Returns a const reverse iterator to the beginning of the array.
-
void fill(const_
reference value) constexpr - Fills the array with the given value.
- void swap(array& other) constexpr
- Exchanges the contents of this array with those of the other one.
Friends
- void swap(array& a, array& b) constexpr
- Exchanges the contents of an array with those of another one.
- auto operator==(const array& a, const array& b) -> bool constexpr
- Equal operator.
- auto operator<(const array& a, const array& b) -> bool constexpr
- Less than operator.
- auto operator>(const array& a, const array& b) -> bool constexpr
- Greater than operator.
- auto operator<=(const array& a, const array& b) -> bool constexpr
- Less than or equal operator.
- auto operator>=(const array& a, const array& b) -> bool constexpr
- Greater than or equal operator.
Function documentation
template<typename Type>
bool operator==(const array& a,
const array& b) constexpr
Equal operator.
Parameters | |
---|---|
a | First array to compare. |
b | Second array to compare. |
Returns | true if the first array is equal to the second one, otherwise false . |
template<typename Type>
bool operator<=(const array& a,
const array& b) constexpr
Less than or equal operator.
Parameters | |
---|---|
a | First array to compare. |
b | Second array to compare. |
Returns | true if the first array is lexicographically less than or equal to the second one, otherwise false . |
template<typename Type>
bool operator>=(const array& a,
const array& b) constexpr
Greater than or equal operator.
Parameters | |
---|---|
a | First array to compare. |
b | Second array to compare. |
Returns | true if the first array is lexicographically greater than or equal to the second one, otherwise false . |