#pragma once //Support for legacy compilers lacking variadic template support #if (defined(_WIN32) && _MSC_VER < 1800) /*TODO: Support these too || (defined(__clang__) && (__clang_major__ < 2 || (__clang_major__ == 2 && __clang_minor__ < 9))) \ || (!defined(__clang__) && defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3))) \ || defined(SPRAWL_NO_VARIADIC_TEMPLATES)*/ #include "hashmap/HashMap_Windows.hpp" namespace sprawl { namespace collections { template class HashSet : public HashMap, _MAX_NIL_LIST> { // }; template class BasicHashMap : public HashMap, _MAX_NIL_LIST> { // }; } } #else #include "hashmap/HashMap_Variadic.hpp" namespace sprawl { namespace collections { template using HashSet = HashMap>; template using BasicHashMap = HashMap>; template using MemberHashMap = HashMap>; template using ConstMemberHashMap = HashMap>; namespace detail { template struct UnderlyingType { typedef typename std::remove_reference()))>::type type; }; template struct MethodType { typedef typename UnderlyingType::type UType; typedef KeyType(UType::*type)(void); typedef KeyType(UType::*const_type)(void) const; }; } template::type function> using PtrMemberHashMap = HashMap::type, KeyType, function, ValueType>>; template::const_type function> using PtrConstMemberHashMap = HashMap::type, KeyType, function, ValueType>>; template using FunctionHashMap = HashMap>; template::type*)> using PtrFunctionHashMap = HashMap::type, KeyType, function, ValueType>>; } } #endif