dune-common
2.3.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
dune
common
binaryfunctions.hh
Go to the documentation of this file.
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_BINARYFUNCTIONS_HH
4
#define DUNE_BINARYFUNCTIONS_HH
5
10
#include <functional>
11
#include <algorithm>
12
13
namespace
Dune
14
{
15
template
<
typename
Type>
16
struct
Min
17
: std::binary_function<Type,Type,Type>
18
{
19
Type
operator()
(
const
Type& t1,
const
Type& t2)
const
20
{
21
return
std::min(t1,t2);
22
}
23
};
24
25
template
<
typename
Type>
26
struct
Max
27
: std::binary_function<Type,Type,Type>
28
{
29
Type
operator()
(
const
Type& t1,
const
Type& t2)
const
30
{
31
return
std::max(t1,t2);
32
}
33
};
34
}
35
36
#endif
Generated on Mon Nov 24 2014 20:14:44 for dune-common by
1.8.1.2