|
HikoGUI
A low latency retained GUI
|
Public Member Functions | |
| constexpr | slice (slice const &) noexcept=default |
| constexpr | slice (slice &&) noexcept=default |
| constexpr slice & | operator= (slice const &) noexcept=default |
| constexpr slice & | operator= (slice &&) noexcept=default |
| constexpr | slice (ptrdiff_t first, ptrdiff_t last, ptrdiff_t step) noexcept |
| constexpr bool | last_is_empty () const noexcept |
| constexpr std::size_t | begin (std::size_t size) const noexcept |
| Get the start offset. | |
| constexpr std::size_t | end (std::size_t size) const noexcept |
| Get the one-step beyond last offset. | |
| constexpr std::string | string () const noexcept |
| constexpr bool | is_singular () const noexcept |
Data Fields | |
| ptrdiff_t | first |
| ptrdiff_t | last |
| ptrdiff_t | step |
|
inlineconstexprnoexcept |
Get the start offset.
| size | The size of the container. |
|
inlineconstexprnoexcept |
Get the one-step beyond last offset.
This will calculate the last offset of an integer number of steps starting from begin(). This allows the end() to be equality compared inside a for loop, even when the step is negative.
| size | The size of the container. |