mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 21:25:13 +00:00
fix preproc condition
This commit is contained in:
parent
87fd2c5121
commit
f52a31a004
@ -1107,7 +1107,7 @@ public:
|
|||||||
// const-reference to element at a given index without bounds checking
|
// const-reference to element at a given index without bounds checking
|
||||||
template <typename... Ix>
|
template <typename... Ix>
|
||||||
const T &operator()(Ix... index) const {
|
const T &operator()(Ix... index) const {
|
||||||
#if defined(NDEBUG)
|
#if !defined(NDEBUG)
|
||||||
check_access_precondition(index...);
|
check_access_precondition(index...);
|
||||||
#endif
|
#endif
|
||||||
return const_reference(index...);
|
return const_reference(index...);
|
||||||
@ -1116,7 +1116,7 @@ public:
|
|||||||
// mutable reference to element at a given index without bounds checking
|
// mutable reference to element at a given index without bounds checking
|
||||||
template <typename... Ix>
|
template <typename... Ix>
|
||||||
T &operator()(Ix... index) {
|
T &operator()(Ix... index) {
|
||||||
#if defined(NDEBUG)
|
#if !defined(NDEBUG)
|
||||||
check_access_precondition(index...);
|
check_access_precondition(index...);
|
||||||
#endif
|
#endif
|
||||||
return mutable_reference(index...);
|
return mutable_reference(index...);
|
||||||
|
Loading…
Reference in New Issue
Block a user