count_code_points(basic_string_view<char8_t>) was defined in
fmt/format-inl.h, and only declared in fmt/format.h, but not defined
in src/format.cc. This commit moves the overload to fmt/format.h and
inlines it.
* 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
The gcc-7.2.0 compiler (and others) were giving shadowed variable warnings for this include file. A simple renaming of a couple local variables eliminates the warnings.
* Update format.cc
As the explicit instantiation *declaration* of `internal::basic_data<void>` in format.h, this explicit instantiation *definition* should mirror FMT_API also.
* Mirror visibility of explicit instantiation declaration
explicit instantiation declaration of internal::basic_data<void> should mirror visibility of FMT_API
* Eliminate `__declspec(dllexport)` designation on extern template internal::basic_data<> when `extern` affected during exporting phase.
* Add `FMT_EXTERN_TEMPLATE_API` for designate DLL export `extern template`
When exporting DLL, do not designate `__declspec(dllexport)` any template that has any explicit class template declaration a.k.a. `extern template`. Instead, designate `__declspec(dllexport)` at single point where we have explicit class template definition a.k.a. normal instantiation without `extern`
Note: this is a c++11 feature.
* Delete whole `FMT_USE_EXTERN_TEMPLATES` block and its condition
1. Remove whole `FMT_USE_EXTERN_TEMPLATES` block
(trailing `FMT_UDL_TEMPLATE` block)
````
#ifndef FMT_USE_EXTERN_TEMPLATES
# ifndef FMT_HEADER_ONLY
# define FMT_USE_EXTERN_TEMPLATES \
((FMT_CLANG_VERSION >= 209 && __cplusplus >= 201103L) || \
(FMT_GCC_VERSION >= 303 && FMT_HAS_GXX_CXX11))
# else
# define FMT_USE_EXTERN_TEMPLATES 0
# endif
#endif
````
2. Delete `FMT_USE_EXTERN_TEMPLATES` condition, only condition, that trailing basic_data class template definition.
````
#if FMT_USE_EXTERN_TEMPLATES
extern template struct basic_data<void>;
#endif
````
3. Replace `FMT_API` with new `FMT_EXTERN_TEMPLATE_API` added in `core.h` for sake of extern template of `basic_data<void>`
* Add `#define FMT_EXTERN extern` only when not `FMT_HEADER_ONLY`
* Replace `extern` on basic_data<void> with the `FMT_EXTERN` condition in core.h
* replace misspelled if !define() with ifndef