3 ms·
> Undefined behavior is not specified > unspecified is stronger than undefined because it gives requirements. I do not understand what you are saying.
by paulddraper 10y ago
> Undefined behavior is not specified
> unspecified is stronger than undefined because it gives requirements.
I do not understand what you are saying.
- kazinator 10y ago"unspecified behavior" in C++ is a formal term denoting a situation in which requirements are in fact given. There are multiple possible requirements, and the implementation chooses which apply, without having to document the choice. So in fact something is specified, just not entirely. "undefined behavior" refers to situations in which no requirements apply at all. (Truly unspecified in the regular sense of the word.)
- paulddraper 10y agoThanks, I understand your usage now. Unspecified means the implementation has some leeway. Undefined means the implementation can do anything.
- kazinator 10y agoYes; as in "unspecified which choice".