Go to the documentation of this file.00001
00002
00003 #ifndef HASH_SET_H
00004 #define HASH_SET_H
00005
00006 #include "osl/stl/hash.h"
00007 #include "osl/stl/pool_allocator.h"
00008 #if (__GNUC__ >= 4 && __GNUC_MINOR__ >=3)
00009 # include <tr1/unordered_set>
00010 #else
00011 # include <boost/unordered_set.hpp>
00012 #endif
00013 #include <cstddef>
00014 namespace osl
00015 {
00016 namespace stl
00017 {
00018 #if (__GNUC__ >= 4 && __GNUC_MINOR__ >=3)
00019 template<class Value, class HashFun=osl::stl::hash<Value>,
00020 class Equal=std::equal_to<Value> >
00021 struct hash_set
00022 : public std::tr1::unordered_set<Value, HashFun, Equal, pool_allocator<Value> >
00023 {
00024 typedef std::tr1::unordered_set<Value, HashFun, Equal, pool_allocator<Value> > base_t;
00025 hash_set() {}
00026 hash_set(size_t s) : base_t(s)
00027 {
00028 }
00029 };
00030 #else
00031 template<class Value, class HashFun=osl::stl::hash<Value>,
00032 class Equal=std::equal_to<Value> >
00033 struct hash_set
00034 : public boost::unordered_set<Value, HashFun, Equal, pool_allocator<Value> >
00035 {
00036 typedef boost::unordered_set<Value, HashFun, Equal, pool_allocator<Value> > base_t;
00037 hash_set() {}
00038 hash_set(size_t s) : base_t(s)
00039 {
00040 }
00041 };
00042 #endif
00043 }
00044 using stl::hash_set;
00045 }
00046
00047 #endif
00048
00049
00050
00051