Dune Core Modules (2.3.1)

maximum.hh
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_GEOMETRY_GENERICGEOMETRY_MAXIMUM_HH
4#define DUNE_GEOMETRY_GENERICGEOMETRY_MAXIMUM_HH
5
7
8namespace Dune
9{
10
11 namespace GenericGeometry
12 {
13
14 // StaticMaximum
15 // -------------
16
17 template< class A, class B >
18 struct StaticMaximum
19 {
20 static const int v = (A::v > B::v ? A::v : B::v);
21 };
22
23
24
25 // Maximum
26 // -------
27
28 template< template< int > class Value, int first, int last >
29 struct Maximum
30 : public GenericForLoop< StaticMaximum, Value, first, last >
31 {};
32
33 }
34
35}
36
37#endif // DUNE_GEOMETRY_GENERICGEOMETRY_MAXIMUM_HH
A static for loop for template meta-programming.
Dune namespace.
Definition: alignment.hh:14
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)