From 5db63fb746259c9e101b5b19a26f39d98716fa9c Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Thu, 22 Oct 2015 21:38:11 +0200 Subject: [PATCH] work around weird macro substitution issue on GCC (fixes issue #7) --- include/pybind11/operators.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/operators.h b/include/pybind11/operators.h index d2caa88f..4c97c36d 100644 --- a/include/pybind11/operators.h +++ b/include/pybind11/operators.h @@ -134,7 +134,7 @@ PYBIND11_INPLACE_OPERATOR(ior, operator|=, l |= r) PYBIND11_UNARY_OPERATOR(neg, operator-, -l) PYBIND11_UNARY_OPERATOR(pos, operator+, +l) PYBIND11_UNARY_OPERATOR(abs, abs, std::abs(l)) -PYBIND11_UNARY_OPERATOR(invert, operator~, ~l) +PYBIND11_UNARY_OPERATOR(invert, operator~, (~l)) PYBIND11_UNARY_OPERATOR(bool, operator!, !!l) PYBIND11_UNARY_OPERATOR(int, int_, (int) l) PYBIND11_UNARY_OPERATOR(float, float_, (double) l)