A non-owning, read-only view over a contiguous sequence of archive item indices.
More...
#include <bit7z/bitindicesview.hpp>
A non-owning, read-only view over a contiguous sequence of archive item indices.
BitIndicesView is essentially a C++11-compatible equivalent of std::span< const std::uint32_t >. It implicitly converts from the most common index containers (a single index, an IndicesVector, a C array, a std::array, or an initializer list), so that the extraction and testing methods can accept any of them through a single parameter type.
◆ BitIndicesView() [1/6]
◆ BitIndicesView() [2/6]
| BitIndicesView |
( |
const_reference | index | ) |
|
|
inlineconstexprnoexcept |
Constructs a BitIndicesView referencing a single index.
- Parameters
-
| index | the single index to be viewed. |
◆ BitIndicesView() [3/6]
Constructs a BitIndicesView referencing the indices stored in the given vector.
- Note
- This constructor can't be constexpr until C++20 due to std::vector's methods.
- Parameters
-
| indices | the vector of indices to be viewed. |
◆ BitIndicesView() [4/6]
| BitIndicesView |
( |
element_type(&) | indices[N] | ) |
|
|
inlineconstexprnoexcept |
Constructs a BitIndicesView referencing the indices stored in the given C array.
- Template Parameters
-
| N | the number of indices in the array. |
- Parameters
-
| indices | the array of indices to be viewed. |
◆ BitIndicesView() [5/6]
template<typename U,
std::size_t N, typename = typename std::enable_if< std::is_convertible< U(*)[ ], element_type(*)[ ] >::value >::type>
| BitIndicesView |
( |
const std::array< U, N > & | indices | ) |
|
|
inlineconstexprnoexcept |
Constructs a BitIndicesView referencing the indices stored in the given std::array.
- Template Parameters
-
| U | the element type of the array (must be convertible to the view's element type). |
| N | the number of indices in the array. |
- Parameters
-
| indices | the array of indices to be viewed. |
◆ BitIndicesView() [6/6]
Constructs a BitIndicesView referencing the indices in the given initializer list.
- Parameters
-
| indices | the initializer list of indices to be viewed. |
◆ begin()
| auto begin |
( |
| ) |
const -> iterator |
|
inlineconstexprnoexcept |
- Returns
- an iterator to the beginning of the viewed indices.
◆ cbegin()
| auto cbegin |
( |
| ) |
const -> const_iterator |
|
inlineconstexprnoexcept |
- Returns
- a const iterator to the beginning of the viewed indices.
◆ cend()
| auto cend |
( |
| ) |
const -> const_iterator |
|
inlineconstexprnoexcept |
- Returns
- a const iterator to the end of the viewed indices.
◆ data()
| auto data |
( |
| ) |
const -> const_pointer |
|
inlineconstexprnoexcept |
- Returns
- a pointer to the beginning of the viewed indices.
◆ empty()
| auto empty |
( |
| ) |
const -> bool |
|
inlineconstexprnoexcept |
- Returns
- true if and only if the view does not reference any index.
◆ end()
| auto end |
( |
| ) |
const -> iterator |
|
inlineconstexprnoexcept |
- Returns
- an iterator to the end of the viewed indices.
◆ size()
| auto size |
( |
| ) |
const -> size_type |
|
inlineconstexprnoexcept |
- Returns
- the number of viewed indices.
The documentation for this class was generated from the following file: