diff --git a/include/pybind11/common.h b/include/pybind11/common.h index 6d06c9dde..e4cb9be50 100644 --- a/include/pybind11/common.h +++ b/include/pybind11/common.h @@ -149,7 +149,7 @@ enum class return_value_policy : int { /// Format strings for basic number types template struct format_descriptor { }; -#define PYBIND11_DECL_FMT(t, n) template<> struct format_descriptor { static std::string value() { return n; }; }; +#define PYBIND11_DECL_FMT(t, n) template<> struct format_descriptor { static std::string value() { return n; }; } PYBIND11_DECL_FMT(int8_t, "b"); PYBIND11_DECL_FMT(uint8_t, "B"); PYBIND11_DECL_FMT(int16_t, "h"); PYBIND11_DECL_FMT(uint16_t, "H"); PYBIND11_DECL_FMT(int32_t, "i"); PYBIND11_DECL_FMT(uint32_t, "I"); PYBIND11_DECL_FMT(int64_t, "q"); PYBIND11_DECL_FMT(uint64_t, "Q"); PYBIND11_DECL_FMT(float, "f"); PYBIND11_DECL_FMT(double, "d"); PYBIND11_DECL_FMT(bool, "?"); diff --git a/include/pybind11/operators.h b/include/pybind11/operators.h index 7eab419c1..b10bfe30c 100644 --- a/include/pybind11/operators.h +++ b/include/pybind11/operators.h @@ -76,13 +76,13 @@ template struct op_impl op(const self_t &, const self_t &) { \ return op_(); \ -}; \ +} \ template op_ op(const self_t &, const T &) { \ return op_(); \ -}; \ +} \ template op_ op(const T &, const self_t &) { \ return op_(); \ -}; +} #define PYBIND11_INPLACE_OPERATOR(id, op, expr) \ template struct op_impl { \ @@ -92,7 +92,7 @@ template struct op_impl op_ op(const self_t &, const T &) { \ return op_(); \ -}; +} #define PYBIND11_UNARY_OPERATOR(id, op, expr) \ template struct op_impl { \ @@ -102,7 +102,7 @@ template struct op_impl op(const self_t &) { \ return op_(); \ -}; +} PYBIND11_BINARY_OPERATOR(sub, rsub, operator-, l - r) PYBIND11_BINARY_OPERATOR(add, radd, operator+, l + r) diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index ecd6ce1a9..0688a31dc 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -974,7 +974,7 @@ PYBIND11_NOINLINE inline void keep_alive_impl(int Nurse, int Patient, handle arg NAMESPACE_END(detail) -template detail::init init() { return detail::init(); }; +template detail::init init() { return detail::init(); } template void implicitly_convertible() { auto implicit_caster = [](PyObject *obj, PyTypeObject *type) -> PyObject * {