std::basic_string_view<CharT,Traits>::end, std::basic_string_view<CharT,Traits>::cend
: cppreference.com
<tbody>
</tbody>
constexpr const_iterator end() const noexcept; |
(C++17) | |
constexpr const_iterator cend() const noexcept; |
(C++17) | |
()
const_iterator
Run this code
#include <iostream>
#include <iterator>
#include <string_view>
int main()
{
std::string_view str_view("abcd");
auto end = str_view.end();
auto cend = str_view.cend();
std::cout << *std::prev(end) << '\n';
std::cout << *std::prev(cend) << '\n';
std::cout << std::boolalpha << (end == cend) << '\n';
}
:
d
d
true
| () |