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
* Fix formatting chrono durations to wide strings
* Make format buffers const correct
* Add FormatWide chrono test case
* Fix incorrect wide encoding of 'µs'
I think might be a source file encoding issue, so I used \u00B5 instead.
* Update FormatWide test to use proper encoding of µs
* Revert changes to format_localized's parameters
* Use different overload of `std::time_put<T>::put` to avoid needing a format string
* Use utf8_to_utf16 instead of having redundant overloads of get_units
* Revert some minor changes
* Remove FMT_CONSTEXPR from expression
This should hopefully fix compilation on VS <2019
* Make suggested changes from code review
* Run clang-format on chrono.h
* Make sure unit isn't null before constructing a string_view from it
If `FMT_STATIC_THOUSANDS_SEPARATOR` defined, then locale is not included or defined, so this call will be unresolved. I think this is the correct fix based on the code in `format-inl.h` and `format.h`
## Problem
In the case of an existing `fmt` namespace (in my project this looks like `Project::fmt`) it is possible to get a namespace clash in debug builds (MSVC 2017)
## Proposed Solution
When referencing `fmt` internally, be explicit that it is relative to the global namespace using `::fmt`