Advertisement
Guest User

Untitled

a guest
Jan 25th, 2020
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.74 KB | None | 0 0
  1. #if _HAS_CXX17
  2. template <class _Iter, class _Hasher = hash<_Guide_key_t<_Iter>>, class _Keyeq = equal_to<_Guide_key_t<_Iter>>,
  3.     class _Alloc = allocator<_Guide_pair_t<_Iter>>,
  4.     enable_if_t<
  5.         conjunction_v<_Is_iterator<_Iter>, _Is_hasher<_Hasher>, negation<_Is_allocator<_Keyeq>>, _Is_allocator<_Alloc>>,
  6.         int> = 0>
  7. unordered_map(_Iter, _Iter, _Guide_size_type_t<_Alloc> = 0, _Hasher = _Hasher(), _Keyeq = _Keyeq(), _Alloc = _Alloc())
  8.     ->unordered_map<_Guide_key_t<_Iter>, _Guide_val_t<_Iter>, _Hasher, _Keyeq, _Alloc>;
  9.  
  10. template <class _Kty, class _Ty, class _Hasher = hash<_Kty>, class _Keyeq = equal_to<_Kty>,
  11.     class _Alloc = allocator<pair<const _Kty, _Ty>>,
  12.     enable_if_t<conjunction_v<_Is_hasher<_Hasher>, negation<_Is_allocator<_Keyeq>>, _Is_allocator<_Alloc>>, int> = 0>
  13. unordered_map(initializer_list<pair<_Kty, _Ty>>, _Guide_size_type_t<_Alloc> = 0, _Hasher = _Hasher(), _Keyeq = _Keyeq(),
  14.     _Alloc = _Alloc())
  15.     ->unordered_map<_Kty, _Ty, _Hasher, _Keyeq, _Alloc>;
  16.  
  17. template <class _Iter, class _Alloc, enable_if_t<conjunction_v<_Is_iterator<_Iter>, _Is_allocator<_Alloc>>, int> = 0>
  18. unordered_map(_Iter, _Iter, _Alloc)
  19.     ->unordered_map<_Guide_key_t<_Iter>, _Guide_val_t<_Iter>, hash<_Guide_key_t<_Iter>>, equal_to<_Guide_key_t<_Iter>>,
  20.         _Alloc>;
  21.  
  22. template <class _Iter, class _Alloc, enable_if_t<conjunction_v<_Is_iterator<_Iter>, _Is_allocator<_Alloc>>, int> = 0>
  23. unordered_map(_Iter, _Iter, _Guide_size_type_t<_Alloc>, _Alloc)
  24.     ->unordered_map<_Guide_key_t<_Iter>, _Guide_val_t<_Iter>, hash<_Guide_key_t<_Iter>>, equal_to<_Guide_key_t<_Iter>>,
  25.         _Alloc>;
  26.  
  27. template <class _Iter, class _Hasher, class _Alloc,
  28.     enable_if_t<conjunction_v<_Is_iterator<_Iter>, _Is_hasher<_Hasher>, _Is_allocator<_Alloc>>, int> = 0>
  29. unordered_map(_Iter, _Iter, _Guide_size_type_t<_Alloc>, _Hasher, _Alloc)
  30.     ->unordered_map<_Guide_key_t<_Iter>, _Guide_val_t<_Iter>, _Hasher, equal_to<_Guide_key_t<_Iter>>, _Alloc>;
  31.  
  32. template <class _Kty, class _Ty, class _Alloc, enable_if_t<_Is_allocator<_Alloc>::value, int> = 0>
  33. unordered_map(initializer_list<pair<_Kty, _Ty>>, _Alloc)->unordered_map<_Kty, _Ty, hash<_Kty>, equal_to<_Kty>, _Alloc>;
  34.  
  35. template <class _Kty, class _Ty, class _Alloc, enable_if_t<_Is_allocator<_Alloc>::value, int> = 0>
  36. unordered_map(initializer_list<pair<_Kty, _Ty>>, _Guide_size_type_t<_Alloc>, _Alloc)
  37.     ->unordered_map<_Kty, _Ty, hash<_Kty>, equal_to<_Kty>, _Alloc>;
  38.  
  39. template <class _Kty, class _Ty, class _Hasher, class _Alloc,
  40.     enable_if_t<conjunction_v<_Is_hasher<_Hasher>, _Is_allocator<_Alloc>>, int> = 0>
  41. unordered_map(initializer_list<pair<_Kty, _Ty>>, _Guide_size_type_t<_Alloc>, _Hasher, _Alloc)
  42.     ->unordered_map<_Kty, _Ty, _Hasher, equal_to<_Kty>, _Alloc>;
  43. #endif // _HAS_CXX17
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement