vector_pro::crend¶
Return const_iterator to reverse end¶
Returns a const_iterator_pro pointing to the first element in the container and grows in a reverse way.
Parameters¶
none
Return value¶
A const_iterator_pro to the reverse end of the sequence.
Example¶
C++
// vector_pro::crbegin/crend
#include <iostream>
#include "vector_pro.h"
/**
* Output:
* myvector backwards: 5 4 3 2 1
*/
int main ()
{
vector_pro<int> myvector = {1,2,3,4,5};
std::cout << "myvector backwards:";
for (auto rit = myvector.crbegin(); rit != myvector.crend(); ++rit)
std::cout << ' ' << *rit;
std::cout << '\n';
return 0;
}
Complexity¶
Constant.