Skip to content
Snippets Groups Projects
Commit 4c4699e2 authored by Carsten Gräser's avatar Carsten Gräser
Browse files

[concept] Add concept check utilities

The main feature of this header is the constexpr function
models(). The result of

  models<C, T1, ..., TN>()

indicated if the concept C is modeled by the collection
(T1, ..., TN) of types. A concept is a list of valid
expressions that a type must support. Concepts can refine
other concepts to inherit all requirements from those
base concepts.

Besides the concept check function itself, the header contains
some helper functions of the form require requireFoo for additional
checks. The purpose of those functions is to transform a non-satisfied
condition Foo to a substitution failure, such that the corresponding
expression is not valid. E.g.,

  requireConvertible<R>(t.f())

is not valid unless the result of t.f() is convertible to R.
parent 22c410ca
No related branches found
No related tags found
1 merge request!9Feature/conceptcheck
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment