Fixing gcc warnings when -pedantic is used

When using macro PYBIND11_OVERLOAD_PURE with function that doesn't have
arguments gcc complains that
`ISO C99 requires rest arguments to be used`

Adding extra comma after function name seems to work on gcc, not so sure
about msvc in this case.
This commit is contained in:
Kirill Kouzoubov 2016-03-22 20:47:30 +11:00
parent 4fb2471e90
commit f0708156ee

View File

@ -52,7 +52,7 @@ public:
PYBIND11_OVERLOAD_PURE( PYBIND11_OVERLOAD_PURE(
bool, bool,
Example12, Example12,
run_bool run_bool,
); );
throw std::runtime_error("this will never be reached"); throw std::runtime_error("this will never be reached");
} }
@ -61,7 +61,7 @@ public:
PYBIND11_OVERLOAD_PURE( PYBIND11_OVERLOAD_PURE(
void, /* Return type */ void, /* Return type */
Example12, /* Parent class */ Example12, /* Parent class */
pure_virtual /* Name of function */ pure_virtual, /* Name of function */
/* This function has no arguments */ /* This function has no arguments */
); );
} }