by Doug Gregor
Concepts are a major addition to C++0x that make templates more robust, more powerful, ... all » and easier to write and use. At their most basic level, concepts provide a type system for templates. Using concepts, the C++ compiler is able to detect errors in the definition and use of templates before they are instantiated. One immediately obvious benefit of this separate type-checking capability is a dramatic improvement in error messages resulting from improper use of templates. Look a little deeper and we find that concepts support an entirely new programming paradigm, Generic Programming, enabling the construction of a new breed of generic libraries that provide better extensibility, composability, and usability than what is possible with today's C++.
This talk will provide an overview of the new features introduced by concepts and how they will benefit C++ programmers. We will see how concepts can be used to express the core components of the C++ Standard (Template) Library, and explore some of the new capabilities that concepts bring to the C++ language.
Source: Google Tech Talks
F.4 — Constexpr functions (part 4)
-
Constexpr/consteval functions can use non-const local variables Within a
constexpr or consteval function, we can use local variables that are not
constexpr...
1 week ago
No comments:
Post a Comment