Changes between Initial Version and Version 1 of Ticket #9525, comment 1


Ignore:
Timestamp:
Dec 31, 2013, 2:28:46 PM (9 years ago)
Author:
Andreas Huber

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9525, comment 1

    initial v1  
    44> Not to mention this isn't reflected anywhere in the documentation.
    55
    6 Do you use std::vector? If yes, I'm wondering what you get when you run something to the effect of *std::vector::end()? Last time I accidentally did that I got an assertion in DEBUG mode. I RELEASE mode, on most platforms the aforementioned statement would have done the wrong thing and returned the contents of an invalid memory location. IIRC, the standard says that the iterator you get from vector::end() must not be dereferenced.
     6Do you use std::vector? If yes, I'm wondering what you get when you dereference the return value of std::vector::end()? Last time I accidentally did that I got an assertion in DEBUG mode. I RELEASE mode, on most platforms dereferencing the return value of std::vector::end() does the wrong thing and return the contents of an invalid memory location. IIRC, the standard just says that the iterator you get from vector::end() must not be dereferenced.
    77
    88I would argue that it's an almost identical situation with the simple_state::context() function. The reference docs say that you can't call this function in the constructor of a simple_state subclass: