Closed
Description
When using PYBIND11_OVERLOAD_PURE_NAME, like
PYBIND11_OVERLOAD_PURE_NAME(std::string, Animal, "go", Go, n_times);
The compiler gives a warning "Empty statement".
This would not affect the correctness of the programs, but I found that there is a redundant semicolon in the definition of PYBIND11_OVERLOAD_PURE_NAME:
//pybind11.h
#define PYBIND11_OVERLOAD_PURE_NAME(ret_type, cname, name, fn, ...) \
PYBIND11_OVERLOAD_INT(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), name, __VA_ARGS__) \
pybind11::pybind11_fail("Tried to call pure virtual function \"" PYBIND11_STRINGIFY(cname) "::" name "\"");
The semicolon in the last line can be removed.
Metadata
Metadata
Assignees
Labels
No labels