Skip to content

Commit c207063

Browse files
committed
Move string_view include to pytypes.h
1 parent 0c7d446 commit c207063

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

include/pybind11/detail/common.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,6 @@
244244
# include <version>
245245
# endif
246246
#endif
247-
#ifdef PYBIND11_HAS_STRING_VIEW
248-
# include <string_view>
249-
#endif
250247

251248
// #define PYBIND11_STR_LEGACY_PERMISSIVE
252249
// If DEFINED, pybind11::str can hold PyUnicodeObject or PyBytesObject

include/pybind11/pytypes.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
# include <optional>
1919
#endif
2020

21+
#ifdef PYBIND11_HAS_STRING_VIEW
22+
# include <string_view>
23+
#endif
24+
2125
PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
2226

2327
/* A few forward declarations */

0 commit comments

Comments
 (0)