Skip to content

Commit

Permalink
Define BOOST_NO_CXX20_HDR_RANGES for libc++ < 18
Browse files Browse the repository at this point in the history
At least for Clang the `-fexperimental-library` flag is required to
enable full range support.
Otherwise e.g. `std::ranges::join_view` won't be available.
  • Loading branch information
Flamefire committed Nov 10, 2024
1 parent 19701e0 commit c6e8be6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/boost/config/stdlib/libcpp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif

// libc++ < 18 requires experimental support enabled, e.g. `-fexperimental-library`
#if (_LIBCPP_VERSION < 180000) && !defined(_LIBCPP_ENABLE_EXPERIMENTAL)
# define BOOST_NO_CXX20_HDR_RANGES
#endif

#if _LIBCPP_VERSION >= 15000
//
// Unary function is now deprecated in C++11 and later:
Expand Down

0 comments on commit c6e8be6

Please sign in to comment.