Skip to content

Commit 2228ee7

Browse files
committed
🐛 Make CX_VALUE capture-free
Problem: - `CX_VALUE` without any capture clauses is important for use cases where the lambda has to be default constructible. Solution: - Remove the remaining default capture clauses from `CX_VALUE`.
1 parent b325dd5 commit 2228ee7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/stdx/utility.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,14 @@ template <typename T> constexpr auto is_ct_v<T const> = is_ct_v<T>;
242242
::stdx::cxv_detail::from_any( \
243243
__VA_ARGS__)>())::value) { \
244244
return ::stdx::overload{ \
245-
::stdx::cxv_detail::cx_base{}, [&] { \
245+
::stdx::cxv_detail::cx_base{}, [] { \
246246
return ::stdx::type_identity< \
247247
decltype(::stdx::cxv_detail::type_of< \
248248
::stdx::cxv_detail::from_any( \
249249
__VA_ARGS__)>())>{}; \
250250
}}; \
251251
} else { \
252-
return ::stdx::overload{::stdx::cxv_detail::cx_base{}, [&] { \
252+
return ::stdx::overload{::stdx::cxv_detail::cx_base{}, [] { \
253253
return (__VA_ARGS__) + \
254254
::stdx::cxv_detail::type_val{}; \
255255
}}; \

0 commit comments

Comments
 (0)