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

Merge branch 'feature/conceptcheck' into 'master'

Feature/conceptcheck

This introduces the function

    template<class C, class... T>
    static constexpr bool models();

Its result indicates if the concept C is modelled by the collection
T... of types. A concept is a list of 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, this contains
some helper functions of the form `require*` that transform
a non-matching condition to a substitution failure. E.g.,

    requireConvertible<R>(t.f())

is not valid unless the result of `t.f()` is convertible to R.

Since `models()` is the user interface, it's contained in the
namespace Dune::. In contrast the various `require*()` functions
needed for concept definitions are in the namespace Dune::Concept::.
I strongly propose that concept definitions themselves also go into
namespaces Dune::(NonCoreModule::)Concept.

This merge request depends on the TypeList feature (!7).


See merge request !9
parents 55c1793c b6f9a597
No related branches found
No related tags found
No related merge requests found
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