Skip to content

Commit

Permalink
fix: disable ranges in clang < 16
Browse files Browse the repository at this point in the history
  • Loading branch information
ObeliskGate committed Aug 16, 2024
1 parent 74615a0 commit f10c40f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/pybind11/detail/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,13 @@ PYBIND11_WARNING_DISABLE_MSVC(4505)

#if defined(PYBIND11_CPP20)
# if __has_include(<ranges>) // __has_include has been part of C++17, no need to check it
# define PYBIND11_HAS_RANGES
# if !defined(PYBIND11_COMPILER_CLANG)
# define PYBIND11_HAS_RANGES
# else
# if __clang_major__ >= 16 // llvm/llvm-project#52696
# define PYBIND11_HAS_RANGES
# endif
# endif
# endif
#endif

Expand Down

0 comments on commit f10c40f

Please sign in to comment.