Merge pull request #374 from mloskot/faq-issue-368-update

Update FAQ 8 with shorter version of clean-and-minimize idiom
This commit is contained in:
Milo Yip 2015-07-03 10:15:04 +08:00
commit eb5818a5a2

View File

@ -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): * 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) ## Document/Value (DOM)