Boost logo

Boost Users :

From: Brian Allison (brian_at_[hidden])
Date: 2006-09-14 14:41:21


David Abrahams wrote:

>Brian Allison <brian_at_[hidden]> writes:
>
>
>
>>David Abrahams wrote:
>>
>>
>>
>>>"Peter Dimov" <pdimov_at_[hidden]> writes:
>>>
>>>
>>>
>>>
>>>
>>>>No, a singular iterator is not a valid object and it fulfills no
>>>>invariants.
>>>>
>>>>
>>>>
>>>>
>>>That's arguable. From my POV, if it's in a state that a legal program
>>>can create, it's within the invariant by definition.
>>>
>>>
>>>
>>>
>>>
>>Then (if I read you correctly) even undefined behavior is within the
>>invariant?
>>
>>
>
>No, invariants are about state and UB is about behavior. Behaviors
>don't fall inside or outside of states.
>
>
>
>>Or have I been misunderstanding that legal programs can cause UB?
>>
>>
>
>I don't understand the question, sorry.
>
>When a program causes undefined behavior, that falls into the category
>I'm calling "illegal program." I don't just mean those programs that
>can be diagnosed as illegal by the compiler.
>
>

  I misunderstood you - I thought you meant "illegal program" in the
sense of any program which run afoul of the standard.

  Thanks for the clarification.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net