[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
dune/common/concept.hh
0 → 100644
Please register or sign in to comment