Item 55: Get familiar with Boost

Source: Internet
Author: User

Item 55: Get familiar with Boost

Item 55: Familiarize yourself with Boost.

Boost is a C ++ developer community. As a test site for the C ++ standard, it hosts many high-quality, open-source, cross-platform, and compiler-independent C ++ libraries, including the implementation of many TR1 components.

Boost is incomparable to other C ++ organizations and communities:

  • Close relationship with the C ++ Standards Committee. The members of the Boost community and the C ++ Standards Committee have a great intersection. Most of the next-generation C ++ standards come from the Boost community.
  • Special Project receiving process. First, put it in the mail list, and then start the entire process: Discussion, optimization, and resubmit until satisfied.

    Libraries in the Boost community vary widely. smaller libraries (such as Convention) have only a few lines of code besides error processing and cross-platform code. Larger libraries (such as Boost Graph Library and Boost MPL Library) but they need the entire book to write them. These libraries can be divided into the following major categories:

    • String and text processing. Type-safeprintf, Regular expression, tokenizing, and parsing ).
    • Container. STL-style fixed-size array, variable-size Bitset, and multi-dimensional array.
    • Function objects and high-level programming. For example, an interesting Lambda Library:

      cpp using namespace boost::lambda; std::vector v; std::for_each(v.begin(), v.end(), std::cout<< _1 * 2 + 10 << "\n");

      _ 1 is a placeholder for the Lambda library, indicating the current element

    • Generic programming. Including a set of extensible traits classes, see Item 47.
    • Template metaprogramming (TMP, see Item 48 ).
    • Numeric calculation. Including rational number, eight yuan number, maximum common number, and minimum common number.
    • Correctness and test. Formal and test-driven programming of implicit template interfaces.
    • Data structure. Includes a type-safe consortium and tuples.
    • Cross-language support. For example, C ++ and Python provide libraries for seamless interoperability.
    • Memory. Such as a fixed-size memory pool distributor.
    • Miscellaneous. CRC check, time and date operations, file system traversal, and so on.

      There are also some things in the programming field that are not in Boost, such as GUI development and database connection.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.