Commit ac7ec8ea by Abseil Team Committed by Copybara-Service

Update documentation to reflect best practices (prefer brace initialization)

PiperOrigin-RevId: 585691325
Change-Id: Icd18dc0294dfd1e22f9878b628d5e5898fcc8185
parent 2fca6417
...@@ -205,9 +205,9 @@ DereferenceFormatter() { ...@@ -205,9 +205,9 @@ DereferenceFormatter() {
// // sign. This pattern would also work with, say, a // // sign. This pattern would also work with, say, a
// // `std::vector<std::pair<>>`. // // `std::vector<std::pair<>>`.
// std::map<std::string, int> m = { // std::map<std::string, int> m = {
// std::make_pair("a", 1), // {"a", 1},
// std::make_pair("b", 2), // {"b", 2},
// std::make_pair("c", 3)}; // {"c", 3}};
// std::string s = absl::StrJoin(m, ",", absl::PairFormatter("=")); // std::string s = absl::StrJoin(m, ",", absl::PairFormatter("="));
// EXPECT_EQ(s, "a=1,b=2,c=3"); // EXPECT_EQ(s, "a=1,b=2,c=3");
// //
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment