Hacker News new | ask | show | jobs
by zokier 4517 days ago
C++ has all sorts of fun stuff. One example is std::vector<bool>, which is not implemented as a simple array of booleans like every other std::vector, but instead it is a bitmap. Afaik this behavior is required by standard. One fun side-effect is that you can't take the address of individual elements of the vector.

Compare these two:

http://ideone.com/qC9yOp

http://ideone.com/jF4krp