apt-get install libboost-all-dev
Ref: https://stackoverflow.com/questions/12578499/how-to-install-boost-on-ubuntu
Boost path
root@master211:~/workspace/test# whereis boost
boost: /usr/include/boost
Use -l boost_program_options
Ref: https://stackoverflow.com/questions/45466939/parsing-command-line-arguments-with-boost-program-options-c
creating image with boost
root@master211:~/workspace/test# ls
add_options.cpp out
root@master211:~/workspace/test# g++ add_options.cpp -l boost_program_options
root@master211:~/workspace/test# ls
add_options.cpp a.out out
root@master211:~/workspace/test# ./a.out
Optimization level is 10
Listen port is 0
root@master211:~/workspace/test#
Boost property tree useful
https://stackoverflow.com/questions/24235589/how-to-copy-subtree-from-boost-propertytree
https://stackoverflow.com/questions/36868297/how-to-output-boost-property-tree-as-json-encoded-string
Sometimes a value must be converted to a literal text form, such as an int represented as a string, or vice-versa, when a string is interpreted as an int. Such examples are common when converting between data types internal to a program and representation external to a program, such as windows and configuration files.
The lexical_cast function template offers a convenient and consistent form for supporting common conversions to and from arbitrary types when they are represented as text.
Reference : https://www.boost.org/doc/libs/1_36_0/libs/conversion/lexical_cast.htm
Reference : https://gist.github.com/wush978/6190443
https://stackoverflow.com/questions/4548395/how-to-retrieve-the-thread-id-from-a-boostthread
Creation of this object results in a thread
Object constructor can bind to io_service or a method
Allows to set absolute and relative time
Allows to wait for timeout in synchronous and async manner . For async, callback needs to be provided
Allows to set callback as function or method of class object
https://www.boost.org/doc/libs/1_66_0/doc/html/boost_asio/reference/deadline_timer.html