Skip to content

Prevent massive amount of MSVC C4100 warnings#525

Merged
randombit merged 1 commit intorandombit:masterfrom
Rohde-Schwarz:MSVC-C4100-fix
Jul 5, 2016
Merged

Prevent massive amount of MSVC C4100 warnings#525
randombit merged 1 commit intorandombit:masterfrom
Rohde-Schwarz:MSVC-C4100-fix

Conversation

@neusdan
Copy link
Contributor

@neusdan neusdan commented Jul 5, 2016

C4100 warning

C4100 can also be issued when code calls a destructor on a otherwise unreferenced parameter of primitive type. This is a limitation of the Visual C++ compiler.

Without this "fix" there are > 150 of this warnings.

@codecov-io
Copy link

Current coverage is 81.83%

No coverage report found for master at 0414a4f.

Powered by Codecov. Last updated by 0414a4f...28c97bc

@randombit randombit merged commit 28c97bc into randombit:master Jul 5, 2016
randombit added a commit that referenced this pull request Jul 5, 2016
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4100)
template<typename U> void destroy(U* p) { p->~U(); }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fix this warning locally with this:
template void destroy(U* p) { p = p; p->~U(); }

Not that it really matters.

@neusdan neusdan deleted the MSVC-C4100-fix branch March 28, 2017 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants