Is bitset part of stl?

Mar 31, 2011 at 2:20pm
I am a bit confuse about it
I only know bitset is not a container of stl
Thanks a lot
Mar 31, 2011 at 2:48pm
yes, it is part of STL.

See here: http://cplusplus.com/reference/stl/bitset/
Mar 31, 2011 at 6:07pm
Yes, but vector <bool> is probably a better alternative. See the bottom of this page:
http://www.cplusplus.com/reference/stl/vector/
Mar 31, 2011 at 6:28pm
vector<bool> is somewhat misleading, as it does not fulfill the standard's criteria for a container. It is proxied to optimize for space not efficiency.

I would prefer a bitset to vector<bool>. For more information see More Exceptional C++ by Herb Sutter.
Last edited on Mar 31, 2011 at 6:28pm
Mar 31, 2011 at 8:59pm
Thank you very much, I haven't finished Exceptional C++ yet
Apr 1, 2011 at 12:07am
+1 moorecm
Topic archived. No new replies allowed.