Skip to content

Commit fa83b3d

Browse files
committed
Add more template parameters to the stubs to match the spec
1 parent 5a9a245 commit fa83b3d

File tree

2 files changed

+30
-20
lines changed

2 files changed

+30
-20
lines changed

cpp/common/test/includes/standard-library/unordered_map.h

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
#ifndef _GHLIBCPP_UNORDERED_MAP
22
#define _GHLIBCPP_UNORDERED_MAP
33

4+
#include <functional>
45
#include <initializer_list>
56
#include <utility>
67

78
namespace std {
89

9-
template<typename K, typename V>
10+
template <typename K, typename V, typename Hash = std::hash<K>,
11+
typename KeyEqual = std::equal_to<K>,
12+
typename Allocator = std::allocator<std::pair<const K, V>>>
1013
class unordered_map {
1114
public:
12-
unordered_map();
13-
unordered_map(const unordered_map&);
14-
unordered_map(unordered_map&&);
15-
unordered_map(std::initializer_list<std::pair<const K, V>>);
15+
unordered_map();
16+
unordered_map(const unordered_map &);
17+
unordered_map(unordered_map &&);
18+
unordered_map(std::initializer_list<std::pair<const K, V>>);
1619
};
1720

18-
template<typename K, typename V>
21+
template <typename K, typename V, typename Hash = std::hash<K>,
22+
typename KeyEqual = std::equal_to<K>,
23+
typename Allocator = std::allocator<std::pair<const K, V>>>
1924
class unordered_multimap {
2025
public:
21-
unordered_multimap();
22-
unordered_multimap(const unordered_multimap&);
23-
unordered_multimap(unordered_multimap&&);
24-
unordered_multimap(std::initializer_list<std::pair<const K, V>>);
26+
unordered_multimap();
27+
unordered_multimap(const unordered_multimap &);
28+
unordered_multimap(unordered_multimap &&);
29+
unordered_multimap(std::initializer_list<std::pair<const K, V>>);
2530
};
2631

2732
} // namespace std

cpp/common/test/includes/standard-library/unordered_set.h

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,30 @@
22
#define _GHLIBCPP_UNORDERED_SET
33

44
#include <initializer_list>
5+
#include <vector>
56

67
namespace std {
78

8-
template<typename T>
9+
template <typename T, typename Hash = std::hash<T>,
10+
typename Equal = std::equal_to<T>,
11+
typename Allocator = std::allocator<T>>
912
class unordered_set {
1013
public:
11-
unordered_set();
12-
unordered_set(const unordered_set&);
13-
unordered_set(unordered_set&&);
14-
unordered_set(std::initializer_list<T>);
14+
unordered_set();
15+
unordered_set(const unordered_set &);
16+
unordered_set(unordered_set &&);
17+
unordered_set(std::initializer_list<T>);
1518
};
1619

17-
template<typename T>
20+
template <typename T, typename Hash = std::hash<T>,
21+
typename Equal = std::equal_to<T>,
22+
typename Allocator = std::allocator<T>>
1823
class unordered_multiset {
1924
public:
20-
unordered_multiset();
21-
unordered_multiset(const unordered_multiset&);
22-
unordered_multiset(unordered_multiset&&);
23-
unordered_multiset(std::initializer_list<T>);
25+
unordered_multiset();
26+
unordered_multiset(const unordered_multiset &);
27+
unordered_multiset(unordered_multiset &&);
28+
unordered_multiset(std::initializer_list<T>);
2429
};
2530

2631
} // namespace std

0 commit comments

Comments
 (0)