This fixed a compilation error of the OS X 10.11.6 C++ compiler:
./fmt/test/format-test.cc:1861:16: error: default initialization of an object of const type 'const Answer' without a user-provided default constructor
const Answer const_answer;
^
{}
When `MoveCtor` performs `check_move_buffer`, the buffer allocator becomes null,
but then `MoveCtor` attempts to use it to allocate a dynamic buffer. This
succeeds nevertheless because a typical `std::allocator<char>::allocate` does
not use `this`, so it does not crash when `this` is null.
Fixes#1344
Refactor `format_specs` and related APIs to support variable-width fill
(#1109), improve naming consistency, remove legacy setters (#940), and
optimize layout.
* Fix conditional `char8_t` from `format.h` and fix `-Wunused-result` of [[no_discard]] begin() when in c++17
* Suppress `-Winconsistent-dllimport` when in clang-target-msvc
* Suppress warning _CRT_SECURE_NO_WARNINGS in MSVC and -Wdeprecated-declarations
Suppress warning _CRT_SECURE_NO_WARNINGS in MSVC and -Wdeprecated-declarations of POSIX functions in Clang target MSVC.
Those functions are used by gtest.
* Remove FMT_FUNC, mark FMT_API to export
* This translation unit includes `gtest.h` in which using something like `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]
* Moving `test_count_digits` to format-impl-test then count_digits<4>(internal::uintptr_t) shall not be exported
* retaining _CRT_SECURE_NO_WARNINGS always defined should be no harms.