cpp-pybind11-playground
cpp-pybind11-playground copied to clipboard
Typo in classes example
The description for getName
member function is placed out of the def
invocation:
https://github.com/aoloe/cpp-pybind11-playground/blob/c2a3d9a7a83b5cc39eba74c8dcc613f05ac086d7/classes/src/main.cpp#L34
However the compiler ignores that description and the example works:
[ 50%] Building CXX object CMakeFiles/pet.dir/src/main.cpp.o
classes/src/main.cpp:38:37: warning: expression result unused [-Wunused-value]
.def("getName", &Dog::getName), "Getting the dog's name";
^~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
[100%] Linking CXX shared module pet.cpython-39-darwin.so
[100%] Built target pet