mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-20 06:49:25 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user