You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use defined for PYBIND11_HAS_OPTIONAL, PYBIND11_HAS_EXP_OPTIONAL, PYBIND11_HAS_VARIANT
These variables are not set in certain circumstances, and if the project
using pybind11 sets -Wundef, the warnings will show.
In all other usages outside of stl.h, ifdef/defined has already been used,
this commit converts the remaining ones under stl.h.
ext/pybind11/include/pybind11/stl.h:292:5: error: "PYBIND11_HAS_OPTIONAL" is not defined, evaluates to 0 [-Werror=undef]
292 | #if PYBIND11_HAS_OPTIONAL
| ^~~~~~~~~~~~~~~~~~~~~
ext/pybind11/include/pybind11/stl.h:300:5: error: "PYBIND11_HAS_EXP_OPTIONAL" is not defined, evaluates to 0 [-Werror=undef]
300 | #if PYBIND11_HAS_EXP_OPTIONAL
| ^~~~~~~~~~~~~~~~~~~~~~~~~
ext/pybind11/include/pybind11/stl.h:372:5: error: "PYBIND11_HAS_VARIANT" is not defined, evaluates to 0 [-Werror=undef]
372 | #if PYBIND11_HAS_VARIANT
| ^~~~~~~~~~~~~~~~~~~~
0 commit comments