A sample code that shows the difference between template vector, vector<T>, and the specialized vector for type bool, vector<bool>. vector<bool> does not satisify the container requirements, e.g. X::reference requirement defined in Table 96 in 23.2.1 General container requirements in the C++ Standard 2011. Also, it has performance issues comparing with vector<T> (This example show the results comparing with vector<int> and vector<char>). vector<bool> is not as good as we expected at the first glance.