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
No related branches found
No related tags found
Showing
- dune/common/CMakeLists.txt 2 additions, 1 deletiondune/common/CMakeLists.txt
- dune/common/Makefile.am 2 additions, 1 deletiondune/common/Makefile.am
- dune/common/concept.hh 294 additions, 0 deletionsdune/common/concept.hh
- dune/common/test/CMakeLists.txt 9 additions, 0 deletionsdune/common/test/CMakeLists.txt
- dune/common/test/collectorstream.hh 81 additions, 0 deletionsdune/common/test/collectorstream.hh
- dune/common/test/concept.cc 200 additions, 0 deletionsdune/common/test/concept.cc
- dune/common/test/testsuite.hh 206 additions, 0 deletionsdune/common/test/testsuite.hh
- dune/common/typeutilities.hh 33 additions, 8 deletionsdune/common/typeutilities.hh
Loading
Please register or sign in to comment