Indent absl container examples consistently

PiperOrigin-RevId: 759023113
Change-Id: I84d18d16abddf70a00160e2bc3c25d5a90f52e79
This commit is contained in:
Abseil Team
2025-05-15 00:45:28 -07:00
committed by Copybara-Service
parent 48e429c986
commit 2fe3c4b14e
6 changed files with 56 additions and 56 deletions

View File

@@ -117,8 +117,8 @@ class ABSL_ATTRIBUTE_OWNER btree_map
//
// * Copy assignment operator
//
// absl::btree_map<int, std::string> map4;
// map4 = map3;
// absl::btree_map<int, std::string> map4;
// map4 = map3;
//
// * Move constructor
//
@@ -555,8 +555,8 @@ class ABSL_ATTRIBUTE_OWNER btree_multimap
//
// * Copy assignment operator
//
// absl::btree_multimap<int, std::string> map4;
// map4 = map3;
// absl::btree_multimap<int, std::string> map4;
// map4 = map3;
//
// * Move constructor
//

View File

@@ -119,8 +119,8 @@ class ABSL_ATTRIBUTE_OWNER btree_set
//
// * Copy assignment operator
//
// absl::btree_set<std::string> set4;
// set4 = set3;
// absl::btree_set<std::string> set4;
// set4 = set3;
//
// * Move constructor
//
@@ -475,8 +475,8 @@ class ABSL_ATTRIBUTE_OWNER btree_multiset
//
// * Copy assignment operator
//
// absl::btree_multiset<std::string> set4;
// set4 = set3;
// absl::btree_multiset<std::string> set4;
// set4 = set3;
//
// * Move constructor
//

View File

@@ -115,18 +115,18 @@ struct FlatHashMapPolicy;
// absl::flat_hash_map<std::string, std::string> ducks =
// {{"a", "huey"}, {"b", "dewey"}, {"c", "louie"}};
//
// // Insert a new element into the flat hash map
// ducks.insert({"d", "donald"});
// // Insert a new element into the flat hash map
// ducks.insert({"d", "donald"});
//
// // Force a rehash of the flat hash map
// ducks.rehash(0);
// // Force a rehash of the flat hash map
// ducks.rehash(0);
//
// // Find the element with the key "b"
// std::string search_key = "b";
// auto result = ducks.find(search_key);
// if (result != ducks.end()) {
// std::cout << "Result: " << result->second << std::endl;
// }
// // Find the element with the key "b"
// std::string search_key = "b";
// auto result = ducks.find(search_key);
// if (result != ducks.end()) {
// std::cout << "Result: " << result->second << std::endl;
// }
template <class K, class V, class Hash = DefaultHashContainerHash<K>,
class Eq = DefaultHashContainerEq<K>,
class Allocator = std::allocator<std::pair<const K, V>>>
@@ -158,9 +158,9 @@ class ABSL_ATTRIBUTE_OWNER flat_hash_map
//
// * Copy assignment operator
//
// // Hash functor and Comparator are copied as well
// absl::flat_hash_map<int, std::string> map4;
// map4 = map3;
// // Hash functor and Comparator are copied as well
// absl::flat_hash_map<int, std::string> map4;
// map4 = map3;
//
// * Move constructor
//

View File

@@ -114,16 +114,16 @@ struct FlatHashSetPolicy;
// absl::flat_hash_set<std::string> ducks =
// {"huey", "dewey", "louie"};
//
// // Insert a new element into the flat hash set
// ducks.insert("donald");
// // Insert a new element into the flat hash set
// ducks.insert("donald");
//
// // Force a rehash of the flat hash set
// ducks.rehash(0);
// // Force a rehash of the flat hash set
// ducks.rehash(0);
//
// // See if "dewey" is present
// if (ducks.contains("dewey")) {
// std::cout << "We found dewey!" << std::endl;
// }
// // See if "dewey" is present
// if (ducks.contains("dewey")) {
// std::cout << "We found dewey!" << std::endl;
// }
template <class T, class Hash = DefaultHashContainerHash<T>,
class Eq = DefaultHashContainerEq<T>,
class Allocator = std::allocator<T>>
@@ -154,9 +154,9 @@ class ABSL_ATTRIBUTE_OWNER flat_hash_set
//
// * Copy assignment operator
//
// // Hash functor and Comparator are copied as well
// absl::flat_hash_set<std::string> set4;
// set4 = set3;
// // Hash functor and Comparator are copied as well
// absl::flat_hash_set<std::string> set4;
// set4 = set3;
//
// * Move constructor
//

View File

@@ -110,18 +110,18 @@ class NodeHashMapPolicy;
// absl::node_hash_map<std::string, std::string> ducks =
// {{"a", "huey"}, {"b", "dewey"}, {"c", "louie"}};
//
// // Insert a new element into the node hash map
// ducks.insert({"d", "donald"}};
// // Insert a new element into the node hash map
// ducks.insert({"d", "donald"}};
//
// // Force a rehash of the node hash map
// ducks.rehash(0);
// // Force a rehash of the node hash map
// ducks.rehash(0);
//
// // Find the element with the key "b"
// std::string search_key = "b";
// auto result = ducks.find(search_key);
// if (result != ducks.end()) {
// std::cout << "Result: " << result->second << std::endl;
// }
// // Find the element with the key "b"
// std::string search_key = "b";
// auto result = ducks.find(search_key);
// if (result != ducks.end()) {
// std::cout << "Result: " << result->second << std::endl;
// }
template <class Key, class Value, class Hash = DefaultHashContainerHash<Key>,
class Eq = DefaultHashContainerEq<Key>,
class Alloc = std::allocator<std::pair<const Key, Value>>>
@@ -153,9 +153,9 @@ class ABSL_ATTRIBUTE_OWNER node_hash_map
//
// * Copy assignment operator
//
// // Hash functor and Comparator are copied as well
// absl::node_hash_map<int, std::string> map4;
// map4 = map3;
// // Hash functor and Comparator are copied as well
// absl::node_hash_map<int, std::string> map4;
// map4 = map3;
//
// * Move constructor
//

View File

@@ -108,16 +108,16 @@ struct NodeHashSetPolicy;
// absl::node_hash_set<std::string> ducks =
// {"huey", "dewey", "louie"};
//
// // Insert a new element into the node hash set
// ducks.insert("donald");
// // Insert a new element into the node hash set
// ducks.insert("donald");
//
// // Force a rehash of the node hash set
// ducks.rehash(0);
// // Force a rehash of the node hash set
// ducks.rehash(0);
//
// // See if "dewey" is present
// if (ducks.contains("dewey")) {
// std::cout << "We found dewey!" << std::endl;
// }
// // See if "dewey" is present
// if (ducks.contains("dewey")) {
// std::cout << "We found dewey!" << std::endl;
// }
template <class T, class Hash = DefaultHashContainerHash<T>,
class Eq = DefaultHashContainerEq<T>, class Alloc = std::allocator<T>>
class ABSL_ATTRIBUTE_OWNER node_hash_set
@@ -147,9 +147,9 @@ class ABSL_ATTRIBUTE_OWNER node_hash_set
//
// * Copy assignment operator
//
// // Hash functor and Comparator are copied as well
// absl::node_hash_set<std::string> set4;
// set4 = set3;
// // Hash functor and Comparator are copied as well
// absl::node_hash_set<std::string> set4;
// set4 = set3;
//
// * Move constructor
//