FMT_DEPRECATED is now defined as FMT_HAS_CPP14_ATTRIBUTE(deprecated), as this attribute was introduced in C++14.
FMT_FALLTHROUGH is now defined as FMT_HAS_CPP17_ATTRIBUTE(fallthrough), as this attribute was introduced in C++17.
FMT_MAYBE_UNUSED is defined as FMT_HAS_CPP17_ATTRIBUTE(maybe_unused), as this attribute was introduced in C++17.
FMT_MAYBE_UNUSED has been applied to fix a couple of -Wunused-member-function warnings from clang.
FMT_STRING_IMPL has an internal helper named FMT_STRING, however FMT_STRING is also the name of the macro that invokes FMT_STRING_IMPL.
Renaming this helper avoids the appearance of a recursive macro.
grisu_count_digits is only used by grisu_gen_digits, which assigns the unsigned result to a (signed) int.
Although grisu_count_digits always returns a positive integer this keeps its return type in sync with the type its result is assigned to.
* Fix -Wsign-conversion in bigint::subtract_aligned.
n is assigned a size_t, and only used for comparisons with j.
j is assigned 0, compared to n (size_t), and passed to basic_memory_buffer::operator[] (size_t).
* Fix -Wsign-conversion in bigint::assign.
num_bigits is initialised to 0, is only ever incremented, and is passed to basic_memory_buffer::operator[] (size_t) and basic_memory_buffer::resize (size_t).
The current `FMT_FORMAT_AS` macro will make `formatter<Char *>::format`
have the first argument type `const Char *&` which is incorrect an
should be `Char *const &`. This pull request fixes that by changing the
first argument type in the macro definition body from `const Type &` to
`Type const &`.
Make FMT_API symbols use the default visibility on non-Windows
platforms. Otherwise, one cannot use the generated fmt library when
compiling globally with -fvisibility=hidden.
Fixes compile errors like:
```
../3rdParty/fmt/include/fmt/core.h:757: error: undefined reference to 'fmt::v6::internal::assert_fail(char const*, int, char const*)'
```
Note that the symbol exists, but is local:
```
$ nm -C libfmtd.so.6.1.3 | grep assert_fail
U __assert_fail
0000000000233ffa t fmt::v6::internal::assert_fail(char const*, int, char const*)
```
With this patch, the compile error is gone and the symbol is properly
exported:
```
$ nm -a bin/libfmtd.so -C | grep assert_fail
U __assert_fail
00000000002366ba T fmt::v6::internal::assert_fail(char const*, int, char const*)
```
Change-Id: I96054e622d9a2ae81907e1b01a1033e629767a91