Mark Merendino wrote:
> Im trying to use the equal_list() method and passing a vector to it.
> such as in the example from the manual...
I see you're still using the old manuals. I elided that stuff when
moving it over to the new structure, in the name of simplicity. It
seemed like a case of someone who was too close to the library
documenting internals when they should have kept quiet about it.
I suggest one of two things: a) we figure out how this feature is
supposed to work, and document it toward the end of the existing SSQLS
section of the user manual; or b) we keep it as it is: an internal
feature mentioned only in the reference manual.
> vector<bool> a;
> a = false; a = false; a = true; a = true; a =
You're skating on thin ice with that technique. Subscripting a vector
doesn't expand it. Since you haven't reserve()d any space in the
vector, you're depending on the implementation to preallocate some for
you. It happens that you usually get 10 or so slots at the start with
the STL implementations I'm familiar with, but it's bad form to depend
on them being there.
The simplest safe code is:
vector<bool> a(5, false);
a = true;
a = true;