type_declaration: @struct type = {
require: (this) = { }
}
require_fn: type == std::function<void(bool, std::string_view)>;
array2: (inout t: type_declaration) = {
require: require_fn = :(args...) t&$*.require(args...);
_ = require;
}
main: () = { }
main.cpp2:6:91: error: variable 'require' cannot be implicitly captured in a lambda with no capture-default specified
6 | require_fn require {[_0 = (&t)](auto const& ...args) mutable -> auto { return CPP2_UFCS(require, (*cpp2::assert_not_null(_0)), args...); }};
| ^
main.cpp2:6:14: note: 'require' declared here
6 | require_fn require {[_0 = (&t)](auto const& ...args) mutable -> auto { return CPP2_UFCS(require, (*cpp2::assert_not_null(_0)), args...); }};
| ^
See thread starting at #550 (comment):