C++ concepts provide much-improved support for generic programming. In particular, they allow the specification of constraints on template arguments. The constraints are used to extend the usual overloading and partial specialization capabilities of the language, allowing generic data structures and algorithms to be “refined” based on their properties rather than their type names.
The following keywords are reserved for concepts.
assumes
assume(n > 0)
. axiom
forall
forall (int n) n + 0 == n
). concept
requires
The front end also exposes a number of internal mechanism that can be used to simplify the writing of type traits. Note that some of these traits are likely to be removed in the future.
__is_same (type1, type2)
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-6.3.0/gcc/C_002b_002b-Concepts.html