In order to provide the amortized constant time complexity required by range
, filter_view::begin
caches the result in *this
. This modifies the internal state of *this
and thus cannot be done in a const
member function.
More Related Contents:
- How to use std::views::transform on a vector?
- Is it better in C++ to pass by value or pass by constant reference?
- What is meant with “const” at end of function declaration? [duplicate]
- Const map element access
- int vs const int& [closed]
- Functions with const arguments and Overloading
- Is there a way to access the underlying container of STL container adaptors?
- Top-level const doesn’t influence a function signature
- Why catch an exception as reference-to-const?
- changing the value of const variable in C++ [duplicate]
- std::vector and contiguous memory of multidimensional arrays
- Why an unnamed namespace is a “superior” alternative to static? [duplicate]
- C/C++ changing the value of a const
- Will specialization of function templates in std for program-defined types no longer be allowed in C++20?
- Why use a const member function?
- Easy rule to read complicated const declarations?
- When can you omit the file extension in an #include directive?
- What are top-level const qualifiers?
- Pointer to array with const qualifier in C & C++
- C++ Modules – why were they removed from C++0x? Will they be back later on?
- Which headers in the C++ standard library are guaranteed to include another header?
- Is it unspecified behavior to compare pointers to different arrays for equality?
- What is a constant reference? (not a reference to a constant)
- constexpr const vs constexpr variables?
- How to convert “pointer to pointer type” to const?
- C++: Why is const_cast evil?
- Why default three-way operator (spaceship ) generates equality operator (==) and user define three-way operator not?
- Can we apply content not explicitly cited from the normative references to the C++ standard?
- asio How to change the executor inside an awaitable?
- Why C++ ranges “transform -> filter” calls transform twice for values that match the filter’s predicate?