Summary of new thinking of C + + design

Source: Internet
Author: User

compiler assertions, helper libraries generate meaningful error messages for generic code

Template biasing allows you to specialized templates, not for specific, fixed set parameters, but for a group of parameters that match a pattern

A partial class that lets you do something interesting, especially with the template function

Constant integer mapping outside I type, allowing values to be assigned as a factor in the compilation period

Type-by-type mapping allows you to take advantage of function overloading to replace one of the features of C + +: function template biasing.

Type selection, allowing you to choose a Boolean condition to select the type

Detection of conversions and inheritance during compilation allows you to determine whether any type can be converted to or from one another, or whether there is an inheritance relationship.

TypeInfo a template class that wraps the Std::type_info, which contains the attributes of value semantics and order comparison

Nulltype and Emptytype, which function like a placeholder in the template metaprogramming

Typetrait offers a number of general purpose traits, allowing you to customize your code to different types.

Summary of new thinking of C + + design

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.