Commit Graph

7318 Commits

Author SHA1 Message Date
Victor Zverovich
720da57bab Remove reference to unused intrinsic 2024-11-03 17:18:33 -08:00
Victor Zverovich
680db66c3a Explicitly export symbols from detail 2024-11-03 09:13:17 -08:00
Victor Zverovich
56ce41ef63 Remove initializer_list dependency 2024-11-03 08:26:25 -08:00
Victor Zverovich
cf50e4d6a4 Fix const[expr] in context API 2024-11-03 07:25:52 -08:00
Victor Zverovich
6580d7b808 Cleanup the format API 2024-11-03 06:57:36 -08:00
Victor Zverovich
7e73566ce7 Minor cleanup 2024-11-02 11:24:24 -07:00
Victor Zverovich
8523dba2dc Make constexpr precede explicit consistently 2024-11-02 11:03:03 -07:00
Victor Zverovich
e3d3b24fc1 Minor cleanup 2024-11-02 10:46:58 -07:00
Victor Zverovich
1521bba701 Use consistent types for argument count 2024-11-02 08:08:36 -07:00
dependabot[bot]
00649552a8
Bump github/codeql-action from 3.26.6 to 3.27.0 (#4223)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.6 to 3.27.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](4dd16135b6...662472033e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-01 09:13:46 -07:00
Victor Zverovich
4b8e2838f0 More cleanup 2024-10-27 10:56:52 -07:00
Victor Zverovich
7d4662f7ab Remove FMT_BUILTIN_CTZ 2024-10-27 10:22:43 -07:00
Victor Zverovich
27110bc474 Minor cleanup 2024-10-27 09:44:25 -07:00
Sergey
68f3153762
Fix narrowing conversion warning in struct fstring (#4210)
Warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data.
2024-10-27 06:41:20 -07:00
Vladislav Shchapov
168df9a064
Implement fmt::format_to into std::vector<char> (#4211)
* Implement fmt::format_to into std::vector<char>

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>

* Move get_container to the trait

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>

---------

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-10-26 09:23:59 -07:00
Sergey
4daa3d591f
Fix error: cannot use 'try' with exceptions disabled in Win LLVM Clang (#4208)
Fixes #4207.

LLVM Clang on Windows does not define `__GNUC__`. The preprocessor falls
to `#elif FMT_MSC_VERSION && !_HAS_EXCEPTIONS` with `_HAS_EXCEPTIONS 1`
defined in vcruntime.h:104.
2024-10-23 10:43:55 -07:00
Victor Zverovich
e9eaa27e5a Add std::exception to the docs 2024-10-20 09:42:29 -07:00
Victor Zverovich
2b6a786e35 Use standard context in print 2024-10-20 09:08:24 -07:00
Victor Zverovich
a16ff5787b Add support for code units > 0xFFFF in fill 2024-10-20 07:59:58 -07:00
Victor Zverovich
601be1cbe7 Add support for code units > 0xFFFF in fill 2024-10-19 08:15:50 -07:00
Vinay Yadav
58c185b634
Changing type of data_ to size_t to avoid compilation warnings (#4200)
Changing type data_ to size_t because
1. If lib is cross-compiled for win32 using MXE environment it cause
   compilation warning -Wconversion on line 730 as sizeof(unsigned long)
   = 4 and sizeof(size_t) = 8
2. When lib is compiled on Unix like compiler generate warning
   -Wuseless-cast if static_cast is used to fix issue in 1
2024-10-19 06:59:21 -07:00
Victor Zverovich
a0a9ba2afc Fix hashes 2024-10-18 12:33:42 -07:00
Victor Zverovich
cc2ba8f9ed Cleanup cifuzz action 2024-10-13 11:16:31 -07:00
Victor Zverovich
a18d42b208
Simplify lint (#4197) 2024-10-13 09:28:38 -07:00
Yi Kong
4046f97278
Fix -Wmissing-noreturn warning (#4194)
Fixes warning reported by top of trunk Clang:

include/fmt/chrono.h:447:36: error: function 'throw_duration_error' could be declared with attribute 'noreturn'
2024-10-10 08:59:56 -07:00
Victor Zverovich
6bdc12a199 detail_exported -> detail 2024-10-09 11:04:55 -07:00
Victor Zverovich
786a4b0968 Cleanup fixed_string 2024-10-09 08:42:49 -07:00
Victor Zverovich
2cb3b7c64b
Update README.md 2024-10-06 07:39:03 -07:00
Victor Zverovich
e9cba69057
Update README.md 2024-10-06 07:38:41 -07:00
Victor Zverovich
02537548f3 Cleanup an example 2024-10-04 17:15:07 -07:00
Victor Zverovich
c68c5fa7c7 Test FMT_BUILTIN_TYPES 2024-10-04 16:08:46 -07:00
Haowei
22701d5f63
Address build failures when using Tip-of-Tree clang. (#4187)
When using ToT clang to build fmtlib, it complains 'sv' is not
initialized by a constant expression. This patch addresses this
issue.
2024-10-04 06:45:29 -07:00
Casey Carter
e62c41ffb0
Conform std::iterator_traits<fmt::appender> to [iterator.traits]/1 (#4185)
* Conform `std::iterator_traits<fmt::appender>` to [iterator.traits]/1

> In addition, the types
> ```c++
> iterator_traits<I>::pointer
> iterator_traits<I>::reference
> ```
> shall be defined as the iterator’s pointer and reference types; that is, for an iterator object `a` of class type, the same type as `decltype(a.operator->())` and `decltype(*a)`, respectively. The type `iterator_traits<I>::pointer` shall be void for an iterator of class type `I` that does not support `operator->`. Additionally, in the case of an output iterator, the types
> ```c++
> iterator_traits<I>::value_type
> iterator_traits<I>::difference_type
> iterator_traits<I>::reference
> ```
> may be defined as `void`.

* Remove unnecessary member types from basic_appender

This reverts commit 1accf6c0a0.

* Address clang-format issue
2024-10-03 09:05:14 -07:00
Francesco Cavaliere
18792893d8
Silencing Wextra-semi warning (#4188) 2024-10-03 09:00:55 -07:00
dependabot[bot]
c90bc91862
Bump actions/checkout from 4.1.6 to 4.2.0 (#4182)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.6 to 4.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](a5ac7e51b4...d632683dd7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 13:39:00 -07:00
Victor Zverovich
c95722ad62 Improve naming consistency 2024-09-29 18:17:44 -07:00
Victor Zverovich
db06b0df87 Use countl_zero in bigint 2024-09-29 17:11:22 -07:00
Victor Zverovich
b9ec48d9ca Cleanup bigint 2024-09-29 12:03:07 -07:00
Victor Zverovich
3faf6f181e Add min_of/max_of 2024-09-29 10:24:39 -07:00
Victor Zverovich
d64b100a30 Relax constexpr 2024-09-29 10:04:57 -07:00
Victor Zverovich
ff9ee0461a Fix handling FMT_BUILTIN_TYPES 2024-09-28 09:23:48 -07:00
Victor Zverovich
1c5883bef0 Test nondeterministic conversion to format string 2024-09-28 09:16:28 -07:00
Victor Zverovich
cacc3108c5 Don't assume repeated evaluation of string literal produce the same pointer
Patch by @zygoloid (#4177).
2024-09-28 08:09:33 -07:00
Justin Riddell
fade652ade
Require clang >=15 for _BitInt support (#4176)
For appleclang, fixes issue #4173
2024-09-26 16:10:51 -07:00
Cameron Angus
96dca569a1
Module linkage fixes for shared build (#4169)
* Mark some in-class defined member functions as explicitly inline/constexpr, to avoid missing external symbols when using fmt module with shared build due to modules not defaulting to implicit inline.

* Switch constexpr to inline for context::arg(string_view).
NOTE: Looks as if basic_format_args::get(string_view) could probably be made constexpr instead, but sticking with minimal change approach.

* Work around apparent non-conformance of older MSVC compilers.

* Switch format_int::str() from constexpr to inline to satisfy libstdc++ std::string constexpr limitations.

* Replace usages of macros for constexpr/inline with keywords.

* Fix for locations requiring C++14 constexpr.

* Further minor constexpr tweaks.

* Apply clang format
2024-09-26 07:53:55 -07:00
Victor Zverovich
891c9a73ae Cleanup format API 2024-09-22 15:52:55 -07:00
Victor Zverovich
9282222b7d Export more 2024-09-22 15:10:58 -07:00
Victor Zverovich
e5b20ff0d0 Deprecate detail::locale_ref 2024-09-22 10:44:38 -07:00
Victor Zverovich
ff92223549 Simplify locale handling 2024-09-22 10:21:19 -07:00
Victor Zverovich
80c4d42c66 Cleanup format.h 2024-09-22 08:20:26 -07:00