Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Studio 2022 IntelliSense Error E0095 #122

Closed
rpatters1 opened this issue Jan 24, 2022 · 5 comments · Fixed by #123
Closed

Visual Studio 2022 IntelliSense Error E0095 #122

rpatters1 opened this issue Jan 24, 2022 · 5 comments · Fixed by #123
Labels
help wanted Extra attention is needed invalid This doesn't seem right

Comments

@rpatters1
Copy link
Contributor

rpatters1 commented Jan 24, 2022

I am encountering a strange IntelliSense error in Visual Studio 2022. This is not actually causing the compile to fail or any other issues that I can see. And even weirder, when I click on the error to view the line of code, the error disappears. (I haven't figured out what makes it reappear.) The line of code is line 183:

  char chars_[N + 1];

The error message is here:

Screen Shot 2022-01-24 at 11 19 14 AM

For all I know it is a bug in VS 2022. But I thought I would report it in case it is something you wish to know about.

@Neargye
Copy link
Owner

Neargye commented Jan 25, 2022

Can suppress some kind of warning or error help?

@Neargye Neargye added help wanted Extra attention is needed invalid This doesn't seem right labels Jan 25, 2022
@rpatters1
Copy link
Contributor Author

Oh, sure. As I say, the message comes and goes and it's IntelliSense. It doesn't affect the build. I was wondering if maybe there should be a static_assert on N that limits it to whatever is a generous but reasonable value.

@rpatters1
Copy link
Contributor Author

FWIW: As an experiment I added a static_assert to force N less than UINT16_MAX. So far the error hasn't appeared. (But it's too soon to say if that made a difference.)

@Neargye
Copy link
Owner

Neargye commented Jan 25, 2022

an interesting workaround, I thought about the concert, but so far we have C++17. if this solution will be ok, I can add it myself or you can do PR if you want.

@rpatters1
Copy link
Contributor Author

Ok I'll submit a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed invalid This doesn't seem right
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants