We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 513c50e + ed36fe3 commit 0501f22Copy full SHA for 0501f22
nui/include/nui/frontend/attributes/reference.hpp
@@ -19,7 +19,7 @@ namespace Nui::Attributes
19
requires std::invocable<T, Nui::val&&>
20
Attribute onMaterialize(T&& func) const
21
{
22
- return operator=([&func](std::weak_ptr<Dom::BasicElement>&& element) {
+ return operator=([func = std::forward<T>(func)](std::weak_ptr<Dom::BasicElement>&& element) {
23
func(element.lock()->val());
24
});
25
}
0 commit comments