Concept (generic programming)

From Wikipedia, the free encyclopedia

In generic programming, a concept is a description of supported operations on a type, including syntax and semantics. In this way, concepts are related to abstract base classes but concepts do not require a subtype relationship.

For example, if a type I satisfies the Trivial Iterator concept in C++, and i is of type I, the following are valid expressions with corresponding semantics[1].

I i default construction.
*i must be convertible to some type T.
i->m is valid if (*i).m is.

Concepts have been accepted into the C++ standard for the next revision.

[edit] See also

[edit] External links