Created
November 6, 2018 17:28
-
-
Save cheako/2dfbd9ab1266e451e263747ced2c5f42 to your computer and use it in GitHub Desktop.
Strange error from VSCode 1.23.1.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Demo.hpp> | |
struct Class::Item | |
{ | |
int a; | |
}; | |
Class::Class() : m_item(new Class::Item()){}; | |
/* _new_: | |
* a value of type "Class::Item *" cannot be used to initialize an entity of type "std::unique_ptr<Class::Item, std::default_delete<Class::Item>> *" | |
Class::Item::Class::Item() | |
* | |
* +2 overloads | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <memory> | |
class Class | |
{ | |
Class(); | |
private: | |
struct Item; | |
std::unique_ptr<Item> *m_item; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Version 1.23.1 | |
Commit d0182c3417d225529c6d5ad24b7572815d0de9ac | |
Date 2018-05-10T16:04:28.220Z | |
Shell 1.7.12 | |
Renderer 58.0.3029.110 | |
Node 7.9.0 | |
Architecture ia32 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is because of an extra * after unique_ptr<>.