minor changes in examples

This commit is contained in:
greg
2020-01-01 12:56:26 -05:00
parent e867a03e00
commit 7a39f4d31c
2 changed files with 8 additions and 5 deletions
+3
View File
@@ -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
+5 -5
View File
@@ -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) {