Skip to content

Commit

Permalink
Merge pull request #374 from mloskot/faq-issue-368-update
Browse files Browse the repository at this point in the history
Update FAQ 8 with shorter version of clean-and-minimize idiom
  • Loading branch information
miloyip committed Jul 3, 2015
2 parents a45a289 + 6610577 commit eb5818a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@

* Alternatively, use equivalent of the [C++ swap with temporary idiom](https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Clear-and-minimize):
```
d.Swap(Value(kObjectType).Move())
Value(kObjectType).Swap(d);
```
or equivalent, but sightly longer to type:
```
d.Swap(Value(kObjectType).Move());
```

## Document/Value (DOM)
Expand Down

0 comments on commit eb5818a

Please sign in to comment.