Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find data member of std::bitset?

Tags:

c++

When I read the bitset page on cppreference, I tried to find some data memeber column to see how the data is stored. I found that there's no such column and neither another std class such as std:string. Then I go to https://github.com/llvm-mirror/libcxx/blob/master/include/bitset, check the bitset synopsis comment part, and there's nothing I can't find about its data member. Why? What do I miss here? An example of any std classes would be much appreciated.

like image 579
Rick Avatar asked Sep 15 '25 07:09

Rick


1 Answers

CppReference documents the public interface, which is the only thing the standard mandates and that you are supposed to care about.

Same for the synopsis of the libc++ header: it's just a copy-paste from the standard, probably put there as a reference for the library implementors. You can find the nitty-gritty details of the implementation below.

Data members of STL containers are implementation details you are not supposed to care about and subject to change, both between the various standard libraries implementations, as well as for different versions of the same library or even different compilation flags.

like image 122
Matteo Italia Avatar answered Sep 17 '25 23:09

Matteo Italia