2 #ifndef SPROCKIT_SPROCKIT_UNORDERED_H_ 3 #define SPROCKIT_SPROCKIT_UNORDERED_H_ 10 #include <unordered_map> 11 template <
typename... Args>
12 using spkt_unordered_map = std::unordered_map<Args...>;
14 #include <unordered_set> 15 template <
typename... Args>
16 using spkt_unordered_set = std::unordered_set<Args...>;
23 typename std::enable_if<std::is_enum<T>::value, std::size_t>::type
24 operator()(T
const value)
const {
25 return static_cast<std::size_t
>(value);
30 template <
typename Key,
typename Value>
31 using spkt_enum_map = std::unordered_map<Key, Value, sprockit::enum_hash>;
33 #elif defined(SPKT_HAVE_BOOST) 35 #include <boost/unordered_map.hpp> 36 #define spkt_unordered_map boost::unordered_map 38 #include <boost/unordered_set.hpp> 39 #define spkt_unordered_set boost::unordered_set 41 #elif SPKT_ENABLE_ORDERED_MAP 44 #define spkt_unordered_map std::map 45 #define spkt_enum_map std::map 47 #define spkt_unordered_set std::set 51 #error Configure error - must either have C++11, external boost, order enable ordered maps