Which headers to include?
Hello Boost I am using a few Boost libraries in a project I am working on. I must confess that this is perhaps my first serious use of boost so all this could just be due to lack of familiarity. The one thing that keeps frustrating me about boost is finding out _which headers to include?_ I am not sure if this is a problem with my googling skills or library documentation or maybe I just don't know the proper place to look at but most of the times I need to use a library with lots of headers (I am looking at Boost.Log) I have to go grepping the boost code. Is there something I am missing or is there a better way to go about this problem? Lakshay
On 03/03/18 20:08, Lakshay Garg via Boost wrote:
Hello Boost
I am using a few Boost libraries in a project I am working on. I must confess that this is perhaps my first serious use of boost so all this could just be due to lack of familiarity. The one thing that keeps frustrating me about boost is finding out _which headers to include?_
I am not sure if this is a problem with my googling skills or library documentation or maybe I just don't know the proper place to look at but most of the times I need to use a library with lots of headers (I am looking at Boost.Log) I have to go grepping the boost code.
Is there something I am missing or is there a better way to go about this problem?
With regard to Boost.Log, relevant headers are listed at the very beginning of every section, for example: http://www.boost.org/doc/libs/1_66_0/libs/log/doc/html/log/detailed/sources.... http://www.boost.org/doc/libs/1_66_0/libs/log/doc/html/log/detailed/sink_bac... http://www.boost.org/doc/libs/1_66_0/libs/log/doc/html/log/detailed/expressi... The headers (and in many places - classes and functions in the text) are links into the Reference section. Most of the time, the header name correlates with the component it contains. Other libraries may have different conventions in the docs, but some sort of a reference section is common. You would normally read the docs about a component and follow links to the reference section, which includes the information about headers. Some libraries also have an index section.
On Sat, Mar 3, 2018 at 6:08 PM, Lakshay Garg via Boost
Hello Boost
I am using a few Boost libraries in a project I am working on. I must confess that this is perhaps my first serious use of boost so all this could just be due to lack of familiarity. The one thing that keeps frustrating me about boost is finding out _which headers to include?_
I am not sure if this is a problem with my googling skills or library documentation or maybe I just don't know the proper place to look at but most of the times I need to use a library with lots of headers (I am looking at Boost.Log) I have to go grepping the boost code.
Is there something I am missing or is there a better way to go about this problem?
Not really -- some libraries have different conventions as Andrey points out; and therefore it is from time to time a bit hard to find out what you need because you have to re-adjust to the style of documentation of each library. A cppreference-style page for all of Boost would be very useful. In addition, a cross-referencer (again for all of Boost) would also be awesome as well. I am unsure whether someone is maintaining one. Another alternative for those without quick access to the code and/or tools or while in the mobile phone is using GitHub's search functionality when browsing the Boost's organization (i.e. inside the super-repo it does not work). By the way, next time please try to use the users' list for this kind of question :-) Cheers, Miguel
Lakshay
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (3)
-
Andrey Semashev
-
Lakshay Garg
-
Miguel Ojeda