Incomplete Type is not allowed

Started by rbenn674, 03 December 2022, 02:34:23


I am getting a lot of "Incomplete Type is not allowed" errors on VB 2019. I don't see any issues with the header files and it does compile but I am still lit up with errors. Any ideas?

Screenshot 2022-12-02 202244.png


If it compiles then there is nothing wrong with the code.
Visual Studio uses IntelliSense to detect issues without compiling, but IntelliSense has plenty of bugs itself, which don't even get fixes if you don't have the latest VS version.

At the bottom, above your errors, you have a combo box with "Build + IntelliSense". I think you can change this to just "Build" to only see the real compiler errors.


Yes, selecting build will remove the errors listed but I still have all the error marks on the code page. I will try updating my VS, but I have other projects and libraries with 0  errors in IntelliSense. I can understand warnings, but the errors being there is a little too much for me.


I updated my VS to the newest version and all errors are now gone :) . You must be using a lot of C++20 methods where I am still stuck in my old C++ 11 and 03 standards as that is when I was taught.



Yeah, it's only with modern c++ that Intellisense had issues, it does work fine for older projects. It feels like it is using an older compiler version under the hood.

The code doesn't has to be as modern as you might think to cause issues though. One example that Intellisense couldn't handle until recently is a constructor declaration like "constexpr Vector2() = default", which is perfectly valid even in c++11. I used "constexpr Vector2() {}" for a long time in my code just to work around that issue.

TGUI actually still uses c++14 by default, but it may activate features from newer c++ versions when available (i.e. when you select a higher standard version in Visual Studio).