Noesis 3.2.7 the Delegate operator += for lambdas is not compiled
Hi,
In any example, let in (Commands sample)
It doesn't work in Delegate.h
In any example, let in (Commands sample)
Code: Select all
MainWindow()
{
Initialized() += MakeDelegate(this, &MainWindow::OnInitialized);
Initialized() += [](auto, const auto& e) { }; //C2679
InitializeComponent();
}
Code: Select all
/// Constructor from functor (lambda)
template<class F, class = EnableIf<IsInvocable<decltype(&F::operator()), Ret, Args...>::Result>> // !!!!!!!
Delegate(const F& f);
Re: Noesis 3.2.7 the Delegate operator += for lambdas is not compiled
This is intentional. Versions prior to 3.2.7 were too permissive, allowing incorrect parameters and causing crashes or weird compiler errors.
Now, you must explicitly specify the parameters of the delegate::
Now, you must explicitly specify the parameters of the delegate::
Code: Select all
class MainWindow final: public Window
{
public:
MainWindow()
{
Initialized() += [](BaseComponent*, const EventArgs&)
{
};
}
};
Who is online
Users browsing this forum: No registered users and 4 guests