Next: High Integrity CPP Rule 17.14  Up: 17 Standard Template Library (STL)  Previous: High Integrity CPP Rule 17.12  Contents

High Integrity CPP Rule 17.13   Do not use vector<bool>.

Justification

vector<bool> does not conform to the requirements of a container and does not work as expected in all STL algorithms.

In particular &v[0] does not return a contiguous array of bools as it does for other vector types.

Reference

Effective STL Item 13;ISO C++ 23.1;


HICPP VERSION 2.4  http://www.codingstandard.com   Copyright: © 2007 THE PROGRAMMING RESEARCH GROUP