When messing with STL and boost, I keep seeing folders called "detail" or "impl". What is the purpose for these folders? How do you know what belongs in here?
Are these just private implementations of interfaces?
What is the purpose for these folders?
Are these just private implementations of interfaces?
Basically, yes. It's where Boost and implementations of the standard library typically put stuff that isn't part of the public interface they expose, but needs to be accessible by the implementations of public interfaces.
How do you know what belongs in here?
This is kind of a difficult question to answer because it implies that you can, from the outside looking in, come to a conclusion about where stuff should be in these directories. You should consider these directories to be the analog of "no user servicable parts inside." You can look in and poke around but you never know what you might find, and it could even change between versions of Boost or your C++ environment.
Using header files in these directories directly in your application is highly discouraged and will lead to non-portable code that can break by even minor upgrades to Boost or your C++ compiler.
Having said that, there is no reason you can't explore inside these directories to see how stuff works under the hood!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With