Closed erickguan closed 5 years ago
I have encountered this once again with g++ 7.3 shipping with <optional>
.
https://github.com/pybind/pybind11/commit/ff6bd092d482b0c4e51aeb7367c3e5ecbc18a9de
# if defined(PYBIND11_CPP14) && (__has_include(<experimental/optional>) && \
!__has_include(<optional>))
The problem comes with header files existed at the same time.
I understand playing with detection magic is dangerous and will break many builds. So what's the policy towards a fix?
I used the old package between 2.2.0 ~ 2.2.4. It's fixed in 2.2.4.
Issue description
#include <pybind11/stl.h>
can't compile with clang++-7.0 because optional is no longer experimental.I tried to put macro detection code in
details/common.h
but it doesn't work.Reproducible example code