Commit Graph

5561 Commits

Author SHA1 Message Date
Victor Zverovich
17b362f78c Simplify ostream opt-in API 2022-02-04 18:33:59 -08:00
Victor Zverovich
a5a7e3a261 Update docs 2022-02-04 15:42:22 -08:00
Victor Zverovich
f055ebbd25 Make ostream operators opt in to reduce the risk of ODR violations 2022-02-04 15:06:45 -08:00
Victor Zverovich
8a21e328b8 Remove problematic constructibility check 2022-02-04 12:20:02 -08:00
Victor Zverovich
31e743d06e Don't use ostream for types convertible to string_view 2022-02-04 11:00:00 -08:00
Victor Zverovich
35c0286cd8 Simplify byte handling 2022-02-02 16:13:24 -08:00
Victor Zverovich
c7173a36a1 Drop :: and fix formatting 2022-02-02 07:00:33 -08:00
Charlie Barto
3e8372b96e
qualify unqualified calls to format in compile.h (#2742) 2022-02-01 18:41:19 -08:00
Barry Revzin
a34a97cc1d
Supporting ? as a string presentation type (#2674)
* Supporting ? as a string presentation type.

* Supporting ? as a char presentation type.

* Adding iterator_category to counting_iterator.
2022-01-30 08:55:28 -08:00
Andreas Rogge
ae1aaaee5f
Fix access mode of files created (#2530) (#2733)
The previous fix for this in 4a85db1 was incomplete. The intent was to
mimic what `fopen()` is doing. As per standard[1] `fopen()` also sets
`S_IWGRP` and `S_IWOTH` and lets the umask handle the rest.

[1] https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/functions/fopen.html
2022-01-28 17:12:49 -08:00
Victor Zverovich
1557ab7644 Add format_as for enums 2022-01-28 06:38:02 -08:00
Federico
b00a1eac75
Fixes NVIDIA HPC compiler and Intel ICC compatibility (#2732)
* Fixes NVIDIA HPC compiler and Intel ICC compatibility

* Fixes NVIDIA HPC compiler and Intel ICC compatibility

* Rename FMT_NVHPC_VERSION to FMT_NVCOMPILER_VERSION

Co-authored-by: Federico Busato <fbusato@nvidia.com>
2022-01-26 15:53:04 -08:00
Victor Zverovich
a7aecbfcaa Remove an old mingw workaround 2022-01-23 09:44:53 -08:00
VasiliPupkin256
dfcc730cbd Making target_compile_options PRIVATE, fix #2726, fix #2507 2022-01-23 09:36:11 -08:00
Victor Zverovich
f7a809be6e Clarify the choice of magic numbers and compute the most magic one
https://github.com/fmtlib/fmt/pull/2713#discussion_r788349826
2022-01-23 08:58:58 -08:00
Victor Zverovich
09fde7f4b8 Add fmt::underlying for enum classes 2022-01-22 08:06:22 -08:00
Victor Zverovich
0014024a2c Don't rely on transitive includes 2022-01-21 15:03:28 -08:00
Victor Zverovich
c28500556a FMT_NOEXCEPT -> noexcept 2022-01-20 16:55:47 -08:00
Junekey Jeon
6240d02011 Improve comments 2022-01-19 17:03:44 -08:00
Junekey Jeon
925b744ae8 Improve comments 2022-01-19 17:03:44 -08:00
Junekey Jeon
22b14ff252 Simplify cache recovery 2022-01-19 17:03:44 -08:00
Junekey Jeon
3dc26b44d3 Make a fallback path more compiler-friendly 2022-01-19 17:03:44 -08:00
Junekey Jeon
2e4038bf51 Simplify lines with __builtin_addcll and friends 2022-01-19 17:03:44 -08:00
Junekey Jeon
76336b4f63 Replace noexcept with FMT_NOEXCEPT 2022-01-19 17:03:44 -08:00
Junekey Jeon
9181983483 Fix syntax errors 2022-01-19 17:03:44 -08:00
Junekey Jeon
74097a149b Remove now-unused stuffs 2022-01-19 17:03:44 -08:00
Junekey Jeon
21a1c53381 Fix typo 2022-01-19 17:03:44 -08:00
Junekey Jeon
04eea0f0a8 Remove now-unused stuffs 2022-01-19 17:03:44 -08:00
Junekey Jeon
35a468ed38 Simplify integer checks 2022-01-19 17:03:44 -08:00
Junekey Jeon
1882a7a2c1 Replace Dragonbox cache which allows simpler cache recovery & integer checks 2022-01-19 17:03:44 -08:00
Junekey Jeon
f4dd1b1b8b Simplify Dragonbox Step 3. 2022-01-19 17:03:44 -08:00
Junekey Jeon
70561ed13e Minimize the usage of built-in 128-bit ints
It usually generates slower code than manual handling.
2022-01-19 17:03:44 -08:00
Ivan Volnov
cdf1a3b530
Fix codecvt warning (#2408) (#2725) 2022-01-19 10:26:09 -08:00
Tobias Hellmann
b8b037e930
Fix -Wconversion warning (#2724)
* - try fixing the warning "chrono.h:1217:37: warning: conversion from 'std::make_unsigned<long long int>::type' {aka 'long long unsigned int'} to 'size_t' {aka 'unsigned int'} may change value [-Wconversion]" by casting int to size_t (occurs when cross-compiling to Raspberry Pi ARMv7)

* - remove call to to_unsigned() because using static_cast<size_t> is enough
2022-01-19 06:31:33 -08:00
matrackif
5985f0a7d2
Fix overflow for chrono durations (#2722) 2022-01-17 12:14:59 -08:00
Victor Zverovich
8f8a1a02d5 Fix handling of formattable types implicitly convertible to pointers 2022-01-14 13:42:01 -08:00
Vladislav Shchapov
b02e5af52c
fmt::join support FMT_COMPILE (#2720) 2022-01-14 09:58:49 -08:00
Victor Zverovich
58fb782396 Improve docs 2022-01-13 14:57:17 -08:00
Victor Zverovich
4fe6129d6c Fix FMT_NOEXCEPT definition 2022-01-13 10:20:32 -08:00
Pokechu22
c056a009de
Docs: Fix link to "Compile-time Format String Checks" section (#2712) 2022-01-12 16:07:56 -08:00
Victor Zverovich
7c12118c19 Deprecate buffered_file::fileno 2022-01-12 10:54:44 -08:00
Victor Zverovich
2a09d468da Use noexcept unconditionally 2022-01-12 09:42:29 -08:00
Victor Zverovich
a126b4d888 Check if right shift is arithmetic 2022-01-11 08:23:30 -08:00
Victor Zverovich
9ff91b18cd Simplify write_fractional_seconds 2022-01-09 15:08:46 -08:00
Victor Zverovich
d9f045fba1 Fix a UB in chrono 2022-01-09 14:06:13 -08:00
Barry Revzin
c06bef7273
Adding comments for range formatting. (#2706)
* Adding comments for range formatting.

* Adding missing quotes
2022-01-08 16:37:21 -08:00
Victor Zverovich
3c98f1a4cd Comment style 2022-01-08 09:52:39 -08:00
Barry Revzin
6e0f1399d7
Supporting nested format specs for ranges. (#2673)
* Supporting nested format specs for ranges.

* I dedicate this commit to Eric Niebler.

* clang-format

* PR comments.

* throw -> FMT_THROW

* Need to map every element too.

* Clarifying uncvref_type

* Trying to add a workaround for MSVC.
2022-01-08 09:48:26 -08:00
Alex Guteniev
0102101acc
Make colored print handle UTF-8 (#2701)
* Fix #2681 - Make detail::print handle UTF-8

* Okay, let's do this Windows-only

* drop extra \0

* yay we can throw!
2022-01-06 16:10:53 -08:00
Victor Zverovich
4ac5269b4f
Update ChangeLog.rst 2022-01-06 15:03:01 -08:00