Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I use quite frequently (and it makes my life simpler):</p> <ul> <li><p>smart pointers (<code>shared_ptr</code>, <code>scoped_ptr</code>, <code>weak_ptr</code>, interprocess <code>unique_ptr</code>):</p> <ul> <li><code>scoped_ptr</code> for basic RAII (without shared ownership and ownership transfer), at no cost.</li> <li><code>shared_ptr</code> for more complex operations - when shared ownership is needed. However there is some cost.</li> <li><code>unique_ptr</code> - there is active work at boost on unifying various approaches (present at Boost) to <code>unique_ptr</code> with move emulation.</li> <li>They are really simple to use (header only), easy to learn and very well tested (well, except maybe the <code>unique_ptr</code>)</li> </ul></li> <li><p>Boost Thread - actively developed (threads are now movable) library for working with threads. Hides the complexity of thread implementation on a given platform.</p></li> <li><p>Boost MPL and Fusion - these are more difficult to explain. For long time I didn't use compile time power, but after some reading and learning it turned out that some of my code can be nicely simplified. Still, beware of the compilation time... </p></li> <li><p>Boost Asio</p> <ul> <li>Contrary to the first impression (at least some time ago) it is not only the networking library. It provides asynchronous I/O model that can be used for virtually anything.</li> </ul></li> <li><p>Boost Format (powerful output formatting, but very heavy)</p></li> <li><p>Boost Spirit2x (Karma and Qi used both for parsing and generating output based on a given grammar). Really powerful, can create a parser without resorting to external tools. Yet the compilation time might be a problem. Also version 2x is being actively developed and the documentation is rather scarce (the spirit-devel mailing list is very helpful though)</p></li> <li><p>Boost Bind, Function and Lambda to make your life easier and Boost Phoenix - just to experiment</p></li> <li><p>lexical_cast (something similar might be born soon as boost::string)</p></li> <li><p>Regex/Xpressive - regular expressions</p></li> <li><p>Type traits and concept checks - once again to make your life easier</p></li> <li><p>Math:</p> <ul> <li>various random number generators</li> <li>various statistical distributions</li> <li>ublas - for using LAPACK/BLAS bindings in C++ like way</li> <li>some mathematical functions, normally not available in C++</li> <li>some tools for controlling the conversions between numreric types</li> <li>interval arithmetics</li> </ul></li> <li><p>Boost Iterator (specialized adaptors for iterators and facade for creating your own)</p></li> <li><p>Boost Unit Testing framework</p></li> </ul> <p>And still there are some parts that I'd barely touched in Boost. Probably I also forgot to mention few obvious ones.</p> <p>Remember to use right tools (hammers) for right problems (nails). Remember to keep the solutions simple. Remember about the cost of received functionality (for example <code>shared_ptr</code> or <code>boost::format</code> runtime overhead or MPL/Fusion/Spirit/Phoenix compile time costs and executable sizes). But experiment and learn - it's where the fun is.</p> <p>And when it comes to convincing the management to use the new libraries - you don't have to start with all the libraries. Start with the simple things (probably the ones that have a long and stable Boost history, broad compiler support, are planned for inclusion in TR2/C++1x, etc) and simple examples that show the benefits.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload