mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.tutorial
git-svn-id: svn://ultimatepp.org/upp/trunk@11109 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
e0866b62f4
commit
ee617e1ee0
1 changed files with 10 additions and 0 deletions
|
|
@ -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:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue