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
And this is the error message I get from the generated code:
std::__1::unique_ptr<int, std::__1::default_delete<int>> _x
function "std::__1::unique_ptr<_Tp, _Dp>::unique_ptr(const std::__1::unique_ptr<int, std::__1::default_delete<int>> &) throw() [with _Tp=int, _Dp=std::__1::default_delete<int>]" (declared implicitly) cannot be referenced -- it is a deleted function
The generated constructor attempts to make a copy of a type I am attempting to init capture in my lambda. This type also happens to be non-copyable. For reference, if it was a vector instead of unique_ptr, the generated code works because it can be [and is] copied.
I am experiencing this error using the website cppinsights.io, and using C++14 with the option "show all implicit casts" checked.
The text was updated successfully, but these errors were encountered:
thank you for reporting this. At this point there is some lifting involved to generate the code of the lambda. I check whether it is possible to handle this case correctly.
This is the code I wanted to see expanded; it is valid C++ and compiles fine on my Catalina MBP.
Here is the generated code:
And this is the error message I get from the generated code:
The generated constructor attempts to make a copy of a type I am attempting to init capture in my lambda. This type also happens to be non-copyable. For reference, if it was a
vector
instead ofunique_ptr
, the generated code works because it can be [and is] copied.I am experiencing this error using the website cppinsights.io, and using C++14 with the option "show all implicit casts" checked.
The text was updated successfully, but these errors were encountered: