source: sasview/src/sas/sascalc/simulation/geoshapespy/libgeoshapespy/minmax.h @ d619341

Last change on this file since d619341 was d85c194, checked in by Piotr Rozyczko <piotr.rozyczko@…>, 9 years ago

Remaining modules refactored

  • Property mode set to 100644
File size: 357 bytes
Line 
1#ifndef GUARD_minmax_H
2#define GUARD_minmax_H
3#ifdef _MSC_VER
4// needed to cope with bug in MS library:
5// it fails to define min/max
6
7template <class T> inline T max(const T& a, const T& b)
8{
9
10      return (a > b) ? a : b;
11
12}
13
14template <class T> inline T min(const T& a, const T& b)
15{
16
17      return (a < b) ? a : b;
18
19}
20
21#endif
22
23#endif
Note: See TracBrowser for help on using the repository browser.