Besides types, templates can also be parametrized using non-type arguments from a limited set of structural types. In C++11, the selection was limited to integral types, enumerations and pointers/references to global objects. C++17 introduced a syntactic change, allowing auto to be used instead of a concrete type. Finally, C++20 added support for floating-point types and literal class types (that only have public members and are recursively structural). The argument is available in the template scope as a constant object. A prvalue for non-class types (except for lvalue reference); for class types, the argument is considered a static storage duration object. Compiler Explorer link: https://lnkd.in/eDeSdDFE #cpp #cplusplus #coding #programming #dailybiteofcpp
Šimon Tóth’s Post
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development