Boost is a quasi-standard library, equivalent to the continuation and expansion of STL, its design concept and the STL is close to the use of generics to maximize reuse. But comparing stl,boost is more practical. The STL is concentrated in the algorithm part, and the boost contains a lot of tool classes, can do more specific work.
Boost includes several broad categories: string and Text processing, containers, iterations (Iterator), Algorithms, function objects and higher-order programming, generic programming, template metaprogramming, preprocessing meta-programming, concurrent programming, mathematical correlation, error correction and testing, data structures, input/output, cross-language support, memory-related , syntax analysis, miscellaneous. There are libraries that are contained across categories, that is, the category and the category that belong to it.
In the Text Processing section, the Conversion/lexcial_cast class is used to convert between numeric types and strings using the "C + +" method. It is mainly substituted for functions such as atoi and itoa in the C standard library. Of course, one of the biggest benefits is supporting generics.
The format library provides the "printf-like" function for convection. The method of replacing with parameters such as%d,%s, and so on in printf is very handy in many cases, and the STL iostream lacks such functionality. Format adds this feature to stream and is more powerful than the original printf.
Regex, this is not much to say, the regular expression library. If you need to do string parsing, you will understand how useful regular expressions are.
Spirit, this is the framework for LL analysis, which can be analyzed according to the EBNF rules. (Don't tell me I don't know what EBNF is). It may be used to do the compiler. The average person is not very use to.
Tokenizer Library. I used to see people on csdn. How to divide a string into a string array by a comma. Perhaps some people are envious of VB's split function. Now, the boost Tokenizer also has the same function, if I remember correctly, this tokenizer also support regular expression, is not very cool?
Array: Provides a wrapper for a constant-sized array, likes to use an array but distressed array positioning, determine the size of the array and other functions of the people this happy.
Dynamic_bitset, dynamically allocated size bitset, we know that there is a bitset in STL, which provides a lot of convenience for bit operation. Unfortunately, its size needs to be specified at compile time. Well now, the bitset of the dynamic allocation size of the run time comes.
Graph Provides a container for diagrams and related algorithms. I have not been in the application of the map, need to use the people can see.
Multi_array provides encapsulation of multidimensional arrays, which should still be useful.
There is only one library in concurrent programming, thread, which provides a portable line libraries, but I don't feel very useful on the Windows platform. Because it is based on POSIX threading, POSIX support in Windows is not very good.
The following mathematical and numerical classes contain a lot of numerical processing aspects of the class library, math Class I am not familiar with, but there are several classes are still useful, such as rational fraction, random number classes, and so on.
Static_assert, which provides the compiler's assert functionality.
Test library, a unit test framework, very good.
Concept_check provides generic programming, a little check on generics is not perfect, but better than nothing.
The data type class any, a safe class that can contain different objects. As the element type of the container, the container can contain different types of elements. It is safer than using void *.
Compressed_pair, similar to the pair in STL. However, the empty element is optimized.
Tuple, hehe, may be something that some people dream of. You can have the function return multiple values.
Cross-language support: Python, oh, good stuff. You can map C + + classes and functions to Python. The following is a few csdn on the boost.python of the Chinese information: http://dev.csdn.net/article/19/19828.shtm,http://dev.csdn.net/article/19/19829. Shtm,http://dev.csdn.net/article/19/19830.shtm,http://dev.csdn.net/article/19/19831.shtm
Pool: Memory pools, hehe, do not have to worry about the frequent allocation of free memory to cause memory fragmentation, do not have to do their own hard to achieve.
Smart_ptr: Smart pointers, you don't have to worry about memory leaks. However, the smart pointers in C + + are not perfect, use the time to be careful, do not do too skillful operation.
Date_time, this is the platform, class library-independent implementation, if the program needs cross-platform, you can consider using this.
Timer, which provides a timer, though not a message-based timer in Windows, is said to measure the execution time of a statement.
The uitlity provides a noncopyable class that can implement "cannot replicate" classes. In many cases, we need to avoid a class being copied, such as a class that represents a file handle, and if the file handle is shared by two instances, there are many problems with the operation, and the semantics are not justified. The general way to avoid instance duplication is to privatize the copy construction and operator=, now as long as the inheritance of this class can be, clear a lot.
Value_initialized: Numeric initialization ensures that declared objects are explicitly initialized, but is this really practical? It seems that writing this is more tiring than writing directly to the initialization. Oh, the beholder.
In addition to the Regex, Python and test need to compile the library to use, most of the other can be directly source code application, more convenient. In fact, these libraries are not difficult to use. The main reason is that some libraries need relevant background knowledge, such as meta-programming, STL, generic programming and so on.
Reprinted from "The Boring space of fox insects"
http://blog.csdn.net/huang_xw/article/details/7933814
Introduction to C + + Boost library (some of your own feelings)