Skip to content

Commit 5db63fb

Browse files
author
Wenzel Jakob
committed
work around weird macro substitution issue on GCC (fixes issue #7)
1 parent fa1bfb2 commit 5db63fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/pybind11/operators.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ PYBIND11_INPLACE_OPERATOR(ior, operator|=, l |= r)
134134
PYBIND11_UNARY_OPERATOR(neg, operator-, -l)
135135
PYBIND11_UNARY_OPERATOR(pos, operator+, +l)
136136
PYBIND11_UNARY_OPERATOR(abs, abs, std::abs(l))
137-
PYBIND11_UNARY_OPERATOR(invert, operator~, ~l)
137+
PYBIND11_UNARY_OPERATOR(invert, operator~, (~l))
138138
PYBIND11_UNARY_OPERATOR(bool, operator!, !!l)
139139
PYBIND11_UNARY_OPERATOR(int, int_, (int) l)
140140
PYBIND11_UNARY_OPERATOR(float, float_, (double) l)

0 commit comments

Comments
 (0)