int main()
{
std::auto_ptr<foo> ptr = get_bar();
return 0;
}
This code looks intuitively correct, so it *should* be OK, in general
sense. A closely related issue in the C++ standard is described here:
<http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#463> (may even be
exactly the same, I'm not sure). When corrections to the standard introduce
such severe regressions, I don't know who is to blame.
CodeWarrior compiles this just fine (why am I not surprised?), but still
doesn't compile other intuitively correct code (grrrr...):
void use_foo(std::auto_ptr<foo>);
std::auto_ptr<bar> aBar;
use_foo(aBar);
I'd expect this issue to have been extensively discussed, filed in the gcc
bugzilla etc - I just haven't researched it a lot. Of Apple mail lists,
xcode-users appears the most relevant.
- WBR, Alexey Proskuryakov
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden