end
De cppreference.com
Sintaxis:
#include <set> iterator begin(); const_iterator begin() const;
La función miembro end() devuelve un iterador que apunta al final del set, es decir, apunta a la posición más allá del último elemento. Este iterador debe ser decrementado antes que se pueda dereferenciar y acceder un elemento. end() debe ejecutarse en tiempo constante.
[editar] Ejemplo
El siguiente código usa end() para encontrar el último iterador en un conjunto y enumerar los elementos en orden inverso:
// Crear un conjunto de caracteres set<char> charSet; const char* s = "Hola Mundo"; for( int i=0; i < strlen(s); i++ ) { charSet.insert( s[i] ); } // Mostrar los elementos set<char>::iterator theIterator = charSet.end(); for( --theIterator; theIterator != charSet.end(); ) { theIterator--; cout << *theIterator; } // output is " HTehlor"