Feature/conceptcheck
- Nov 19, 2015
-
-
Carsten Gräser authored
This also adds two test utilities from dune-functions that are both used in this test. * TestSuite: A helper class to organize checks in tests in a unified way and more readable way. * CollectorStream: A simple stream that allows to collect data and forward it to its creator using a callback. Used by testsuite.hh Since can also be used for tests in other modules they are installed in dune/common/test. However, CollectorStream is not strictly related to tests and may also be moved directly to dune/common/.
-
Carsten Gräser authored
-
Carsten Gräser authored
This removed the recently added prioritytag.hh header again. Having a separate header for each of these trivial helpers will only clutter the directory and make people lookup the correct header more often.
-
Carsten Gräser authored
This header should be used to collect all utilities for type computations, constraining overloads, and similar purposes, that are not type-traits.
-
- Nov 18, 2015
-
-
Carsten Gräser authored
-
Carsten Gräser authored
-
Carsten Gräser authored
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.
-