-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fix DLL visibility of count_digits<4>(internal::uintptr_t)
in format-inl.h
#1147
Conversation
…on in format-inl.h In FMT_SHARED mode, format-test.exe wants to DLL import `count_digits<4>(internal::uintptr_t)` explicit full specialization definition in format-inl.h
…on in format-inl.h In FMT_SHARED mode, format-test.exe wants to DLL import `count_digits<4>(internal::uintptr_t)` explicit full specialization definition in format-inl.h
…e `strncpy` Suppress MSVC warnings from `gtest.h` included. Warning sample: fmt-master\test\gtest\gtest.h(2873,10): warning: 'strncpy' is deprecated: This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
Thanks for the PR. Since |
test/custom-formatter-test.cc
Outdated
@@ -5,6 +5,12 @@ | |||
// | |||
// For the license information refer to format.h. | |||
|
|||
#ifdef _MSC_VER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and below: I'd drop _MSC_VER_
altogether. There is no harm in always defining _CRT_SECURE_NO_WARNINGS
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Anyway I notice format-imple-test
is exempted when building DLL. When building DLL it includes format-inl.h
in which cout_digits resides, I wonder if format-imple-test
should be re-enabled also?
…internal::uintptr_t) shall not be exported
…internal::uintptr_t) shall not be exported
Thanks! |
Previously, test-format.exe linking failed because
count_digits<4>(internal::uintptr_t)
not found in the DLL.Also suppresses warning of MSVC's
_CRT_INSECURE_DEPRECATE
functions fromgtest.h
included in custom-formatter-test.ccI agree that my contributions are licensed under the {fmt} license, and agree to future changes to the licensing.