$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: John Maddock (john_at_[hidden])
Date: 2005-02-03 06:19:49
> #ifdef USE_1
> std::cout << i->length() << i++->str().length() <<
> std::endl;
> #endif
I believe that this is an issue with the evaluation of arguments: if you
have a single expression the arguments are evaluated in an unspecified
order - in this case the i++->str().length() gets evaluated before the
i->length(), so i->length() is called on an end-of-sequence iterator (you
should be able to confirm this by stepping through the code in your
debugger).
This is perfectly standard C++ I'm afraid, and is not a library or compiler
bug.
Hope this helps,
John.