ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
min_max.h
Go to the documentation of this file.
1#pragma once
2
3// std::min and std::max for two values. <char_traits.h> includes this, so
4// <ios>, <iostream>, <string> and <vector> reach them as libstdc++ and libc++
5// do (#7536); the rest of <algorithm> is not pulled in with them.
6
7namespace std
8{
9template <class T>
10const T &max(const T &left, const T &right)
11{
12 if (left > right)
13 return left;
14 else
15 return right;
16}
17
18template <class T>
19const T &min(const T &left, const T &right)
20{
21 if (left < right)
22 return left;
23 else
24 return right;
25}
26} // namespace std
#define T
Definition exp2f.c:24
Definition exception.cpp:51
const T & max(const T &left, const T &right)
Definition min_max.h:10
const T & min(const T &left, const T &right)
Definition min_max.h:19