diff options
author | olli <olli@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2010-09-24 07:42:51 +0000 |
---|---|---|
committer | olli <olli@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2010-09-24 07:42:51 +0000 |
commit | 846dc5ec36414f085491b700b49a076b3e0312e9 (patch) | |
tree | 1a8d90f25db7be3bc7b002e314b316a0f0804852 /ACE/ace/ACE.h | |
parent | 713c33e853a9dc0edc0bfb8b3b4d18a95ab54af1 (diff) | |
download | ATCD-846dc5ec36414f085491b700b49a076b3e0312e9.tar.gz |
ChangeLogTag: Fri Sep 24 07:35:27 UTC 2010 Olli Savia <ops@iki.fi>
Diffstat (limited to 'ACE/ace/ACE.h')
-rw-r--r-- | ACE/ace/ACE.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ACE/ace/ACE.h b/ACE/ace/ACE.h index f945155b748..e6457b2c9e8 100644 --- a/ACE/ace/ACE.h +++ b/ACE/ace/ACE.h @@ -642,6 +642,14 @@ namespace ACE /// Computes the base 2 logarithm of {num}. ACE_NAMESPACE_INLINE_FUNCTION u_long log2 (u_long num); + /// Helper to avoid comparing floating point values with + /// operator== (uses operator< and operator>) + template <typename T> + bool is_equal (const T& a, const T& b) + { + return !((a < b) || (a > b)); + } + /// Hex conversion utility. extern ACE_Export ACE_TCHAR nibble2hex (u_int n); |