Error on `it-1` with set iterator <p>In following code I can not recognize difference between <code>--it</code>, and <code>it-1</code>. Also is <code>words.end()</code> value is out of set range?</p> <pre><code>#include &lt;iostream&gt; #include&lt;set&gt; using namespace std; int main() { set&lt;string&gt; words; words.insert("test"); words.insert("crack"); words.insert("zluffy"); set&lt;string&gt;::iterator it=words.end(); cout&lt;&lt;*(--it)&lt;&lt;endl;//just works fine cout&lt;&lt;*(it-1)&lt;&lt;endl;//Error return 0; } </code></pre>