Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

Linux, gcc of course.

like image 930
Qian Avatar asked Mar 20 '11 11:03

Qian


1 Answers

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".

like image 85
Damon Avatar answered Sep 28 '22 06:09

Damon