Skip to content

Commit 4336139

Browse files
committed
review
1 parent bbc715c commit 4336139

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

libcxx/include/__ranges/zip_transform_view.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,8 @@ class zip_transform_view<_Fn, _Views...>::__iterator
169169
: __parent_(std::addressof(__parent)), __inner_(std::move(__inner)) {}
170170

171171
_LIBCPP_HIDE_FROM_ABI constexpr auto __get_deref_and_invoke() const noexcept {
172-
return [this](const auto&... __iters) noexcept(
173-
noexcept(std::invoke(*__parent_->__fun_, *__iters...))) -> decltype(auto) {
174-
return std::invoke(*__parent_->__fun_, *__iters...);
175-
};
172+
return [&__fun = *__parent_->__fun_](const auto&... __iters) noexcept(noexcept(std::invoke(
173+
*__parent_->__fun_, *__iters...))) -> decltype(auto) { return std::invoke(__fun, *__iters...); };
176174
}
177175

178176
public:

libcxx/test/std/ranges/range.adaptors/range.zip.transform/ctor.views.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ constexpr bool test() {
8888

8989
int main(int, char**) {
9090
test();
91-
//static_assert(test());
91+
static_assert(test());
9292

9393
return 0;
9494
}

0 commit comments

Comments
 (0)