EC Reading Notes series 17: Clauses 41, 42, 43, 44, 45, 46

Source: Internet
Author: User

Terms A Understanding implicit interfaces vs. compiler polymorphism

Remember:

Both ★classes and templates support interface and polymorphic

★ For Classes Interface is explicit (explicit), with function signature as the center. Polymorphism is through the virtual function in the run-time

★ For templates, the interface is implicit (implicit), which is laid down in the valid expression . Polymorphism is through template with the initialization and function overload resolution occurs at compile time

Terms the Understand TypeName the Double meaning

Remember:

★ When declaring template parameters, the prefix keyword class and typename are interchangeable ( function templates or class templates are available !!!). )

★ Use the Keyword typename to identify nested subordinate type names , but not as base class modifiers in base class lists or member initial columns

---------------------------------------------------------------------

EC Reading Notes series 17: Clauses 41, 42, 43, 44, 45, 46

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.