requires (!/*is-integer-like*/<W> ||
!/*is-integer-like*/<Bound> ||
/*is-signed-integer-like*/<W> == /*is-signed-integer-like*/<Bound>)
This deduction guide is provided for iota_view
to allow deduction from an initial value and a bounding value.
For the definitions of /*is-integer-like*/ and /*is-signed-integer-like*/, see is-integer-like .
Note that the guide protects itself against bugs arising from sign mismatch, like views::iota(0, v.size()), where â0â is signed and v.size() is unsigned.
[edit] Example#include <cassert> #include <ranges> int main() { auto io = std::ranges::iota_view(1L, 7L); // deduces W and Bound as âlongâ assert(io.front() == 1L and io.back() == 6L); }
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4