std::advance in c++ do not behave correctly : <p>while i was tweaking around with std::list in c++ i used std::advance to access elements randomly.but std::advance is not working as expected.the code is as given below.</p>

<pre><code>#include &lt;list&gt;
#include&lt;iostream&gt;
#include&lt;iterator&gt;
using namespace std;
int main()
{
list&lt;int&gt; i;
typename list&lt;int&gt;::iterator t=i.begin();
i.push_front(0);
i.push_back(1);
i.push_back(2);
i.push_back(3);
cout&lt;&lt;*t&lt;&lt;" ";
advance(t,1);
cout&lt;&lt;*t&lt;&lt;" ";
advance(t,2);
cout&lt;&lt;*t&lt;&lt;" ";
}
</code></pre>

<p>the output i got is 0 0 2
but shouldn't the output be 0 1 3</p>
