From 78a020354ddf50ea621934eb41b7d76ded018ac0 Mon Sep 17 00:00:00 2001 From: Annihil Date: Wed, 2 Mar 2016 02:01:40 +0100 Subject: [PATCH] Corrected readme Internally, the elements in a map are always sorted by its key following a specific strict weak ordering criterion indicated by its internal comparison object (of type Compare). With string type, the default comparator is alphabetical order, and thus two come after three. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 595a37b0b..436922a37 100644 --- a/README.md +++ b/README.md @@ -301,7 +301,7 @@ Likewise, any associative key-value containers (`std::map`, `std::multimap`, `st ```cpp std::map c_map { {"one", 1}, {"two", 2}, {"three", 3} }; json j_map(c_map); -// {"one": 1, "two": 2, "three": 3} +// {"one": 1, "three": 3, "two": 2 } std::unordered_map c_umap { {"one", 1.2}, {"two", 2.3}, {"three", 3.4} }; json j_umap(c_umap);