AMDiS 2.10
The Adaptive Multi-Dimensional Simulation Toolbox
Order.hpp
1#pragma once
2
3#include <type_traits>
4
5#include <amdis/common/ConceptsBase.hpp>
6
7namespace AMDiS
8{
10 template <class F>
11 auto order(F const& f)
12 -> decltype(&F::operator(), f.order())
13 {
14 return f.order();
15 }
16
17 namespace Concepts
18 {
23 namespace Definition
24 {
26 {
27 template <class F>
28 auto require(F&& f) -> decltype(
29 order(f)
30 );
31 };
32
33 } // end namespace Definition
34
36 template <class F>
37 constexpr bool Polynomial = models<Definition::Polynomial(F)>;
38
39 template <class F>
40 using Polynomial_t = models_t<Definition::Polynomial(F)>;
41
44 } // end namespace Concepts
45} // end namespace AMDiS
constexpr bool Polynomial
Funcion F has free function order(F)
Definition: Order.hpp:37