Docs: Fix several errors of examples from the doc (#592)

* [Doc] Fix several errors of examples from the doc

* Add missing operator def.

* Added missing `()`

* Add missing `namespace`.
This commit is contained in:
myd7349
2017-01-13 18:15:52 +08:00
committed by Wenzel Jakob
parent 05bc1ffbe0
commit 9b815ad2e9
5 changed files with 13 additions and 9 deletions

View File

@@ -298,8 +298,8 @@ different kinds of input arguments:
struct Pet {
Pet(const std::string &name, int age) : name(name), age(age) { }
void set(int age) { age = age; }
void set(const std::string &name) { name = name; }
void set(int age_) { age = age_; }
void set(const std::string &name_) { name = name_; }
std::string name;
int age;