diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-05-05 12:53:55 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-05-05 12:53:55 +0000 |
commit | 3c61e20f081bf6fbab6d3483e5e7f71cb91c4974 (patch) | |
tree | 4d687030d8e848eb2c325e8234fb807f578df890 /ace/Min_Max.h | |
parent | 65ce81267a19f490a22443567c75276fc864cbd2 (diff) | |
download | ATCD-RepositoryManager.tar.gz |
This commit was manufactured by cvs2svn to create branchRepositoryManager
'RepositoryManager'.
Diffstat (limited to 'ace/Min_Max.h')
-rw-r--r-- | ace/Min_Max.h | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/ace/Min_Max.h b/ace/Min_Max.h deleted file mode 100644 index e961b510ee8..00000000000 --- a/ace/Min_Max.h +++ /dev/null @@ -1,75 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Min_Max.h - * - * $Id$ - * - * 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 */ - -# if !defined (ACE_LACKS_MIN_MAX_TEMPLATES) -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); -} -# else -// These macros should only be used if a C++ compiler can't grok the -// inline templates -# define ace_min(a,b) (((b) > (a)) ? (a) : (b)) -# define ace_max(a,b) (((a) > (b)) ? (a) : (b)) -# define ace_range(a,b,c) (ace_min(ace_max((a), (c)), (b)) - -# endif /* ACE_LACKS_MIN_MAX_TEMPLATES */ - -# 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 */ |