mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 06:35:12 +00:00
quenched -pendantic warnings (closes #167)
This commit is contained in:
parent
b2b44a9af8
commit
1dc940d4b7
@ -50,9 +50,11 @@ public:
|
|||||||
|
|
||||||
virtual bool run_bool() {
|
virtual bool run_bool() {
|
||||||
PYBIND11_OVERLOAD_PURE(
|
PYBIND11_OVERLOAD_PURE(
|
||||||
bool,
|
bool, /* Return type */
|
||||||
Example12,
|
Example12, /* Parent class */
|
||||||
run_bool
|
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");
|
throw std::runtime_error("this will never be reached");
|
||||||
}
|
}
|
||||||
@ -61,8 +63,9 @@ 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. The trailing comma
|
||||||
|
in the previous line is needed for some compilers */
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -15,7 +15,7 @@ struct Base {
|
|||||||
|
|
||||||
struct DispatchIssue : Base {
|
struct DispatchIssue : Base {
|
||||||
virtual void dispatch(void) const {
|
virtual void dispatch(void) const {
|
||||||
PYBIND11_OVERLOAD_PURE(void, Base, dispatch);
|
PYBIND11_OVERLOAD_PURE(void, Base, dispatch, /* no arguments */);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ protected:
|
|||||||
} \
|
} \
|
||||||
operator type*() { return &value; } \
|
operator type*() { return &value; } \
|
||||||
operator type&() { return value; } \
|
operator type&() { return value; } \
|
||||||
template <typename _T> using cast_op_type = pybind11::detail::cast_op_type<_T>;
|
template <typename _T> using cast_op_type = pybind11::detail::cast_op_type<_T>
|
||||||
|
|
||||||
#define PYBIND11_DECLARE_HOLDER_TYPE(type, holder_type) \
|
#define PYBIND11_DECLARE_HOLDER_TYPE(type, holder_type) \
|
||||||
namespace pybind11 { namespace detail { \
|
namespace pybind11 { namespace detail { \
|
||||||
|
Loading…
Reference in New Issue
Block a user