You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Unable to call a member function on a heap object. #673
Maybe new<foo> should reference a callable object of non-copyable type.
Then this bug could have been prevented.
But something like :(_) = {}(new<foo>) would still work.
Activity
[-][BUG] [/-][+][BUG] Unable to call a member function on a heap object.[/+]JohelEGP commentedon Sep 11, 2023
The error message is bad due to #439.
Here's what I get using Clang with #506:
new<foo>lowers to the template-idcpp2_new<foo>, which is a function pointer.What you want to use instead is
new<foo>().guybrush77 commentedon Sep 11, 2023
@JohelEGP Thanks, that makes sense. I will close this bug.
JohelEGP commentedon Sep 11, 2023
Maybe
new<foo>should reference a callable object of non-copyable type.Then this bug could have been prevented.
But something like
:(_) = {}(new<foo>)would still work.