The description for getName member function is placed out of the def invocation:
|
.def("getName", &Dog::getName), "Getting the dog's name"; |
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
The description for
getNamemember function is placed out of thedefinvocation:cpp-pybind11-playground/classes/src/main.cpp
Line 34 in c2a3d9a
However the compiler ignores that description and the example works: