开发者

What's the meaning of bits in '/usr/include/c++/4.4/bits/'

开发者 https://www.devze.com 2023-02-18 03:17 出处:网络
What\'s the meaning of bits in \'/usr/include/c++/4.4/bits/\' 开发者_运维问答 Linux, gcc of course.The official designation of that folder according to the libstdc++ documentation is:

What's the meaning of bits in '/usr/include/c++/4.4/bits/'

开发者_运维问答

Linux, gcc of course.


The official designation of that folder according to the libstdc++ documentation is:

"Files included by standard headers and by other files in the bits directory"

Where "bits" probably just means something trivial as "the bits that make up the implementation of what you include via the standard headers".

For example, if you include the standard <algorithm> header, you really include bits/c++config.h, bits/stl_relops.h, bits/stl_pair.h bits/stl_algobase.h and bits/stl_algo.h under the hood, each of which defines the odd bits that alltogether give you what someone including <algorithm> would expect to get.

Boost calls the conceptually same folder "detail".


It means that the file is internal to gcc's implementation of the standard library, and you shouldn't include it directly. Where the name "bits" came from, I don't know.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号