We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1c31e9 commit 07a61aaCopy full SHA for 07a61aa
include/pybind11/detail/common.h
@@ -205,10 +205,6 @@
205
# endif
206
#endif
207
208
-#if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L
209
-# define PYBIND11_HAS_U8STRING
210
-#endif
211
-
212
#include <Python.h>
213
#if PY_VERSION_HEX < 0x03060000
214
# error "PYTHON < 3.6 IS UNSUPPORTED. pybind11 v2.9 was the last to support Python 2 and 3.5."
@@ -259,6 +255,11 @@
259
255
260
256
261
257
258
+// Must be after including <version> or one of the other headers specified by the standard
+#if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L
+# define PYBIND11_HAS_U8STRING
+#endif
262
+
263
// #define PYBIND11_STR_LEGACY_PERMISSIVE
264
// If DEFINED, pybind11::str can hold PyUnicodeObject or PyBytesObject
265
// (probably surprising and never documented, but this was the
0 commit comments