From 1dc940d4b7696b1339f1ec4367d3bd31b879b12a Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Mon, 18 Apr 2016 10:34:27 +0200 Subject: [PATCH] quenched -pendantic warnings (closes #167) --- example/example12.cpp | 13 ++++++++----- example/issues.cpp | 2 +- include/pybind11/cast.h | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/example/example12.cpp b/example/example12.cpp index ab1b48294..97ba6a833 100644 --- a/example/example12.cpp +++ b/example/example12.cpp @@ -50,9 +50,11 @@ public: virtual bool run_bool() { PYBIND11_OVERLOAD_PURE( - bool, - Example12, - run_bool + bool, /* Return type */ + Example12, /* Parent class */ + run_bool, /* Name of function */ + /* This function has no arguments. The trailing comma + in the previous line is needed for some compilers */ ); throw std::runtime_error("this will never be reached"); } @@ -61,8 +63,9 @@ public: PYBIND11_OVERLOAD_PURE( void, /* Return type */ Example12, /* Parent class */ - pure_virtual /* Name of function */ - /* This function has no arguments */ + pure_virtual, /* Name of function */ + /* This function has no arguments. The trailing comma + in the previous line is needed for some compilers */ ); } }; diff --git a/example/issues.cpp b/example/issues.cpp index c9f9e8b07..09547aed5 100644 --- a/example/issues.cpp +++ b/example/issues.cpp @@ -15,7 +15,7 @@ struct Base { struct DispatchIssue : Base { virtual void dispatch(void) const { - PYBIND11_OVERLOAD_PURE(void, Base, dispatch); + PYBIND11_OVERLOAD_PURE(void, Base, dispatch, /* no arguments */); } }; diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h index 0fe35274d..6a9ad7c23 100644 --- a/include/pybind11/cast.h +++ b/include/pybind11/cast.h @@ -251,7 +251,7 @@ protected: } \ operator type*() { return &value; } \ operator type&() { return value; } \ - template using cast_op_type = pybind11::detail::cast_op_type<_T>; + template using cast_op_type = pybind11::detail::cast_op_type<_T> #define PYBIND11_DECLARE_HOLDER_TYPE(type, holder_type) \ namespace pybind11 { namespace detail { \