I mean it’s a badly posed question - because my wetware brain immediately went to with what intervening container operations? If I call sort after some inserts is it still LIFO? That implies heavy state maintenance. You probably don’t mean that though. What you mean is erasing in the order end() to begin() - which if I wanted to ensure that I’d use the container erase algorithm on a reversed vector. Bc pretty sure for vector it’s not specified the element order.
Still, your thesis is correct - LLMs parrot all sorts of garbage constantly. And my recent experience with chatGPT 5 makes me think it regressed. Telling me about things in the standard, that are not in the standard.
Well the 'correct' response by an LLM would be to note that complexity, and either ask for clarification from the user or state a reasonable assumption about what the user meant and proceed under that assumption. I think it's reasonable for OP to call out that none of the current LLMs seem to do that, and aside from not noting the hidden complexity, also give an answer which is simply wrong under the (implicit) assumptions that were made.
Of course, this isn't particularly surprising, but it is worth keeping in mind.
Beyond that, I learned something new myself, so I'm happy OP brought this up; I would have thought the standard makes some guarantee about the order of destruction, but apparently it doesn't. I think it should, though.
View all comments
Show parent comment
2
u/azswcowboy Jan 02 '26
I mean it’s a badly posed question - because my wetware brain immediately went to with what intervening container operations? If I call sort after some inserts is it still LIFO? That implies heavy state maintenance. You probably don’t mean that though. What you mean is erasing in the order end() to begin() - which if I wanted to ensure that I’d use the container erase algorithm on a reversed vector. Bc pretty sure for vector it’s not specified the element order.
https://en.cppreference.com/w/cpp/container/vector/erase2
Still, your thesis is correct - LLMs parrot all sorts of garbage constantly. And my recent experience with chatGPT 5 makes me think it regressed. Telling me about things in the standard, that are not in the standard.