Skip to content
Snippets Groups Projects

Feature/conceptcheck

Merged Carsten Gräser requested to merge feature/conceptcheck into master
  1. Nov 19, 2015
    • Carsten Gräser's avatar
      [concept][test] Add test for concept checking facility · b6f9a597
      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/.
      b6f9a597
    • Carsten Gräser's avatar
      Adjust include to moved PriorityTag · b42d77ab
      Carsten Gräser authored
      b42d77ab
    • Carsten Gräser's avatar
      [cleanup] Move PriorityTag to typeutilities.hh · 7a4dbe08
      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.
      7a4dbe08
    • Carsten Gräser's avatar
      Add typeutilities · a247658f
      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.
      a247658f
  2. Nov 18, 2015
    • Carsten Gräser's avatar
      6dcef08d
    • Carsten Gräser's avatar
      Install new header concept.hh · f2569b50
      Carsten Gräser authored
      f2569b50
    • Carsten Gräser's avatar
      [concept] Add concept check utilities · 4c4699e2
      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.
      4c4699e2
Loading