Empty std::vector begin != end

<>

This question already has an answer here:

Answers


That should not be possible. The standard states in [container.requirements.general]/6

begin() returns an iterator referring to the first element in the container. end() returns an iterator which is the past-the-end value for the container. If the container is empty, then begin() == end();

so if contianer.empty() == true then container.begin() must equal container.end()


Need Your Help

LOCAL_SRC_FILES points to a missing file

java eclipse cygwin ar

i'm doing an augemented reality program. i was handed this project and im new to cygwin and android programming. i have to use cygwin to compile one of my cpp file. however when i do a ndk-build on

Valgrind gives an error for nearly everything (Warning: client switching stacks?)

c++ valgrind memory-corruption

I'm corrupting memory somehow because my program crashes without error at random places.