Skip to content

Commit cd67921

Browse files
committed
fix: define PYBIND11_CPP14 for recent intel compilers
1 parent 17c22b9 commit cd67921

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/pybind11/detail/common.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# endif
2828
#endif
2929

30-
#if !(defined(_MSC_VER) && __cplusplus == 199711L) && !defined(__INTEL_COMPILER)
30+
#if !(defined(_MSC_VER) && __cplusplus == 199711L)
3131
# if __cplusplus >= 201402L
3232
# define PYBIND11_CPP14
3333
# if __cplusplus >= 201703L
@@ -49,6 +49,8 @@
4949
#if defined(__INTEL_COMPILER)
5050
# if __INTEL_COMPILER < 1800
5151
# error pybind11 requires Intel C++ compiler v18 or newer
52+
# elif __INTEL_COMPILER < 1900 && defined(PYBIND11_CPP14)
53+
# error pybind11 supports only C++11 with Intel C++ compiler v18. Use v19 or newer for C++14.
5254
# endif
5355
#elif defined(__clang__) && !defined(__apple_build_version__)
5456
# if __clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 3)

0 commit comments

Comments
 (0)