/usr/include/ace/Min_Max.h is in libace-dev 6.0.3+dfsg-0.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | // -*- C++ -*-
//=============================================================================
/**
* @file Min_Max.h
*
* $Id: Min_Max.h 80826 2008-03-04 14:51:23Z wotte $
*
* Define an appropriate set of min()/max() functions using templates.
*
*
* @author Derek Dominish <Derek.Dominish@Australia.Boeing.com>
*/
//=============================================================================
#ifndef ACE_MIN_MAX_H
#define ACE_MIN_MAX_H
#include /**/ "ace/pre.h"
#include /**/ "ace/config-all.h"
# if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
# endif /* ACE_LACKS_PRAGMA_ONCE */
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
template <class T>
inline const T &
ace_min (const T &t1, const T &t2)
{
return t2 > t1 ? t1 : t2;
}
template <class T>
inline const T &
ace_max (const T &t1, const T &t2)
{
return t1 > t2 ? t1 : t2;
}
template <class T>
inline const T &
ace_min (const T &t1, const T &t2, const T &t3)
{
return ace_min (ace_min (t1, t2), t3);
}
template <class T>
inline const T &
ace_max (const T &t1, const T &t2, const T &t3)
{
return ace_max (ace_max (t1, t2), t3);
}
template <class T>
inline const T &
ace_range (const T &min, const T &max, const T &val)
{
return ace_min (ace_max (min, val), max);
}
ACE_END_VERSIONED_NAMESPACE_DECL
# define ACE_MIN(a,b) ace_min((a),(b))
# define ACE_MAX(a,b) ace_max((a),(b))
# define ACE_RANGE(a,b,c) ace_range((a),(b),(c))
#include /**/ "ace/post.h"
#endif /* ACE_MIN_MAX_H */
|