IntelliSense: False positive error message for std::unique_ptr return type #11979
Labels
bug
fixed
Check the Milestone for the release in which the fix is or will be available.
Language Service
Visual Studio
Inherited from Visual Studio
Milestone
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
The code work fine, but for line 14, I got error message: function "std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp> &) [with _Tp=int, _Dp=std::default_delete]" (declared at line 468 of "/usr/include/c++/11/bits/unique_ptr.h") cannot be referenced -- it is a deleted functionC/C++(1776).
I think when return, the unique pointer are tread as rvalue to construct return type fool, but IntelliSense think it is lvalue.
Expected behavior:
No error message.
Configuration and Logs
Other Extensions
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: