-
Notifications
You must be signed in to change notification settings - Fork 545
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
Avoid using unknown #pragma for non-MSVC compiler in public header files. #3890
Conversation
…les. Change(s): [1] For non-MSVC compiler, replace "#pragma once" with more generic include guard method. [2] For non-MSVC compiler, avoid using "#pragma warning(disable:*)". Contributor(s): [1] Ji WenCong <[email protected]>
@microsoft-github-policy-service agree |
Change(s): [1] Added a comment at the end of a "#endif" according to the suggestion of @nibanks. Contributor(s): [1] Ji WenCong <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #3890 +/- ##
==========================================
- Coverage 86.67% 86.25% -0.43%
==========================================
Files 56 56
Lines 16854 16854
==========================================
- Hits 14609 14538 -71
- Misses 2245 2316 +71 |
Description
For non-MSVC compilers,
#pragma once
shall be replaced with more generic and reliable include guard method. In addition,#pragma warning(disable:*)
are not supported by non-MSVC compilers, it shall not be enabled in public header files (*.h
and*.hpp
files) for all non-MSVC compilers.Testing
Compile test.
Documentation
No impact.