mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-29 16:40:39 +08:00
minor changes in examples
This commit is contained in:
@@ -15,6 +15,9 @@ int main()
|
||||
map["lucy"] = 18;
|
||||
map["Andre"] = 20;
|
||||
|
||||
auto it = map.find("Joe");
|
||||
map.erase(it);
|
||||
|
||||
map.insert(std::make_pair("Alex", 16));
|
||||
map.emplace("Emily", 18); // emplace uses pair template constructor
|
||||
|
||||
|
||||
Vendored
+5
-5
@@ -60,11 +60,11 @@ namespace phmap {
|
||||
|
||||
namespace test_internal {
|
||||
|
||||
// A type that counts number of occurrences of the type, the live occurrences of
|
||||
// the type, as well as the number of copies, moves, swaps, and comparisons that
|
||||
// have occurred on the type. This is used as a base class for the copyable,
|
||||
// copyable+movable, and movable types below that are used in actual tests. Use
|
||||
// InstanceTracker in tests to track the number of instances.
|
||||
// A type that counts number of occurrences of the type, the live occurrences of
|
||||
// the type, as well as the number of copies, moves, swaps, and comparisons that
|
||||
// have occurred on the type. This is used as a base class for the copyable,
|
||||
// copyable+movable, and movable types below that are used in actual tests. Use
|
||||
// InstanceTracker in tests to track the number of instances.
|
||||
class BaseCountedInstance {
|
||||
public:
|
||||
explicit BaseCountedInstance(int x) : value_(x) {
|
||||
|
||||
Reference in New Issue
Block a user