Q:

why doesn't list.end()-- decrement the iterator?

so I'm trying to get the concept of Iterators.
int main()
{
    std::list<int> mylist;
    std::list<int>::iterator it1;
    std::list<int>::iterator it2;
    mylist.push_back(1);
    it1 = mylist.end()--;
    mylist.push_back(2);
    it2 = mylist.end();
    it2--;
    std::cout << "first: " << *it1 << std::endl;
    std::cout << "second: " << *it2 << std::endl;
}

Outputs:
first: 2
second: 2
But I expected 1, 2. I've read that -- overloads the operator for iterators and "moves" the iterator to the left. So where exactly is the difference between it1 = mylist.end()--; and it1 = mylist.end(); it1--; ? Because it1--; returns the expected 1 and 2.

A:

The list member end function returns an iterator by value. 
So in this snippet
it1 = mylist.end()--;

the post-increment operator is applied to the temporary returned by .end() after it's assigned to it1. So it1 is exactly equal to .end().
In the 2nd snippet
it2 = mylist.end();
it2--;

you are decrementing it2 itself, so you are pointing to one position before .end().

