[libcxx-commits] [libcxx] [libc++][ranges] use `static operator()` for C++23 ranges (PR #86052)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 21 01:45:49 PDT 2024
================
@@ -489,12 +489,14 @@ namespace views {
namespace __zip {
struct __fn {
- _LIBCPP_HIDE_FROM_ABI constexpr auto operator()() const noexcept { return empty_view<tuple<>>{}; }
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI static constexpr auto operator()() noexcept {
+ return empty_view<tuple<>>{};
+ }
template <class... _Ranges>
- _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Ranges&&... __rs) const
- noexcept(noexcept(zip_view<all_t<_Ranges&&>...>(std::forward<_Ranges>(__rs)...)))
- -> decltype(zip_view<all_t<_Ranges&&>...>(std::forward<_Ranges>(__rs)...)) {
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI static constexpr auto
----------------
mordante wrote:
```suggestion
_LIBCPP_HIDE_FROM_ABI static constexpr auto
```
When adding `_LIBCPP_NODISCARD_EXT` we need to test this property. I'm happy to approve this change + tests in a separate patch, but it should not be a drive-by in this one.
https://github.com/llvm/llvm-project/pull/86052
More information about the libcxx-commits
mailing list