diff options
author | Bernard Normier <bernard@zeroc.com> | 2006-06-28 22:52:03 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2006-06-28 22:52:03 +0000 |
commit | 0e327a88a4640b291ee096fb31396ed4d203f636 (patch) | |
tree | 3155260ffa37d101a4dff4a9152b5a113564c643 /cpp/src/IceGrid/Util.h | |
parent | fix noarch RPM dependencies (diff) | |
download | ice-0e327a88a4640b291ee096fb31396ed4d203f636.tar.bz2 ice-0e327a88a4640b291ee096fb31396ed4d203f636.tar.xz ice-0e327a88a4640b291ee096fb31396ed4d203f636.zip |
Port to Solaris 10 + fix for numerous warnings on Sun
Diffstat (limited to 'cpp/src/IceGrid/Util.h')
-rw-r--r-- | cpp/src/IceGrid/Util.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cpp/src/IceGrid/Util.h b/cpp/src/IceGrid/Util.h index d2196853427..c7f6ed142a3 100644 --- a/cpp/src/IceGrid/Util.h +++ b/cpp/src/IceGrid/Util.h @@ -13,10 +13,22 @@ #include <IceGrid/Descriptor.h> #include <IceUtil/StringUtil.h> #include <IceGrid/Exception.h> +#include <IceUtil/Random.h> + +#include <functional> namespace IceGrid { +struct RandomNumberGenerator : public std::unary_function<ptrdiff_t, ptrdiff_t> +{ + ptrdiff_t operator()(ptrdiff_t d) + { + return IceUtil::random(static_cast<int>(d)); + } +}; + + template<typename T> std::insert_iterator<T> inline set_inserter(T& container) { |