diff --git a/third-party/folly/src/folly/container/range_traits.h b/third-party/folly/src/folly/container/range_traits.h index ad6275d5291ef..1498def895f7c 100644 --- a/third-party/folly/src/folly/container/range_traits.h +++ b/third-party/folly/src/folly/container/range_traits.h @@ -21,7 +21,7 @@ #include #include -#if __has_include() +#if defined(__cpp_lib_ranges) #include #endif diff --git a/third-party/folly/src/folly/container/tape.h b/third-party/folly/src/folly/container/tape.h index 317a1193ae037..80dc353900511 100644 --- a/third-party/folly/src/folly/container/tape.h +++ b/third-party/folly/src/folly/container/tape.h @@ -31,13 +31,13 @@ #include #include -#if __has_include() +#if defined(__cpp_lib_ranges) #include #endif namespace folly { -#if __has_include() +#if defined(__cpp_lib_ranges) #define FOLLY_TAPE_CONTAINER_REQUIRES std::ranges::random_access_range #else #define FOLLY_TAPE_CONTAINER_REQUIRES typename diff --git a/third-party/folly/src/folly/container/test/tape_test.cpp b/third-party/folly/src/folly/container/test/tape_test.cpp index e0abc7a09281d..41c61d990b4c9 100644 --- a/third-party/folly/src/folly/container/test/tape_test.cpp +++ b/third-party/folly/src/folly/container/test/tape_test.cpp @@ -61,7 +61,7 @@ struct InputRange { iterator end() const { return iterator{c_.end()}; } }; -#if __has_include() +#if defined(__cpp_lib_ranges) static_assert(!std::forward_iterator>); static_assert(std::input_iterator>); #endif @@ -105,7 +105,7 @@ static_assert( folly::tape>::reference>, ""); -#if __has_include() +#if defined(__cpp_lib_ranges) static_assert(std::ranges::random_access_range); #endif