.tutorial

git-svn-id: svn://ultimatepp.org/upp/trunk@11109 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2017-05-20 18:05:34 +00:00
parent 0bb31a3540
commit 59febb0579

View file

@ -64,6 +64,16 @@ void Map()
DUMP(e.key);
DUMP(e.value);
}
/// Note that the 'projection range' obtained by `operator~` is temporary value, which
/// means that if mutating operation is required for values, r-value reference has to be
/// used instead of plain reference:
for(const auto& e : ~m)
if(e.key == "2")
e.value.surname = "May";
DUMP(m);
/// You can use Find method to retrieve position of element with required key: