Victor Zverovich
4639843839
Cleanup
2019-06-15 09:44:51 -07:00
Victor Zverovich
e29708ee57
uintptr -> fallback_uintptr to avoid confusion with uintptr_t
2019-06-14 18:47:36 -07:00
Victor Zverovich
f03a6c5325
Cleanup
2019-06-14 13:38:44 -07:00
Victor Zverovich
6c3d584e67
Simplify warning suppression
2019-06-14 13:03:34 -07:00
Victor Zverovich
12f4683883
Make iterator_t an alias template
2019-06-13 21:32:58 -07:00
Victor Zverovich
874d6727e4
Remove workarounds for pre-C++11 compilers
2019-06-13 20:56:08 -07:00
Victor Zverovich
a9940192fb
Fix warnings
2019-06-13 08:56:35 -07:00
Victor Zverovich
34b5418359
Fix warnings
2019-06-13 07:29:10 -07:00
Victor Zverovich
cbbee1b385
Fix handling of hexfloat
2019-06-12 20:53:01 -07:00
Victor Zverovich
92a44db11c
Fix warnings
2019-06-12 19:44:08 -07:00
Victor Zverovich
d05d42751c
Remove old msvc workaround from arg_formatter_base and fix warning
2019-06-12 19:27:23 -07:00
Victor Zverovich
d32fe0f3f6
Fix hadling of nullptr
2019-06-12 09:22:36 -07:00
Victor Zverovich
e5422db4b2
Fix handling of uintptr_t
2019-06-12 08:16:41 -07:00
Victor Zverovich
9d7b64a259
More cleanup
2019-06-11 22:11:47 -07:00
Victor Zverovich
5e293bd97a
Remove unnecessary qualification
2019-06-11 20:36:39 -07:00
Victor Zverovich
4a502d9802
Add remove_reference_t
2019-06-11 20:28:05 -07:00
Victor Zverovich
d384cdd397
Make is_contiguous_back_insert_iterator internal
2019-06-11 20:16:57 -07:00
Victor Zverovich
32544b6108
More cleanup
2019-06-11 19:22:19 -07:00
Victor Zverovich
39f522a13a
get_types -> encode_types
2019-06-11 18:50:14 -07:00
Victor Zverovich
d7d2bebf99
Remove redundant typename
2019-06-11 18:29:47 -07:00
stryku
9427f15bef
Fixed issue with formatting to an array of chars
2019-06-11 18:09:18 -07:00
Victor Zverovich
87fbc6f756
get_type -> mapped_type_constant
2019-06-11 07:23:39 -07:00
Victor Zverovich
a48daa60e5
Remove remove_volatile
2019-06-10 20:25:04 -07:00
Victor Zverovich
afdbbac75c
Cleanup
2019-06-10 18:10:26 -07:00
Victor Zverovich
e33fe14f5b
Simplify visit
2019-06-10 08:28:39 -07:00
Victor Zverovich
e895da2ec3
Clean up value
2019-06-10 07:58:00 -07:00
Victor Zverovich
e1a67b5285
Remove TODO
2019-06-10 06:54:09 -07:00
Victor Zverovich
a291f07e1a
Clean up argument mapping
2019-06-09 22:27:40 -07:00
Victor Zverovich
5d9100fa2f
Move char8_t to fmt/core.h
2019-06-08 09:42:11 -07:00
Victor Zverovich
5d48733596
Clean up value construction
2019-06-07 19:27:20 -07:00
Victor Zverovich
0f0b42861b
Cleanup
2019-06-07 17:53:25 -07:00
Victor Zverovich
209db68b28
Get rid of FMT_CONSTEXPR11
2019-06-07 14:00:57 -07:00
Victor Zverovich
cb4c59495e
Deprecate convert_to_int
2019-06-07 13:38:08 -07:00
Victor Zverovich
40779749ac
is_formattable -> has_formatter
2019-06-07 06:51:21 -07:00
Victor Zverovich
b3cf8613b1
Make formatter specializations override implicit conversions
2019-06-07 06:25:46 -07:00
Victor Zverovich
3fdba04924
Reduce the number of nontrivial formatter instantiations
2019-06-06 22:02:53 -07:00
Victor Zverovich
f5f3ffac59
Merge string make_value overloads
2019-06-06 08:29:16 -07:00
Victor Zverovich
a38b99a188
Fix a regression in named argument handling introduced by prepare
2019-06-05 16:50:04 -07:00
Victor Zverovich
aa31028b2c
char_t_impl -> char_t
2019-06-05 10:13:34 -07:00
Victor Zverovich
0787d69747
Simplify SFINAE
2019-06-05 09:02:33 -07:00
Victor Zverovich
bae00aa8d7
Simplify is_string
2019-06-05 08:41:00 -07:00
Victor Zverovich
388bb389e6
integral_constant -> bool_constant
2019-06-05 08:14:47 -07:00
Victor Zverovich
7e39c7e6f4
Put stringy stuff together
2019-06-05 07:43:20 -07:00
Victor Zverovich
469a4bbd35
Use enable_if_t
2019-06-04 21:38:18 -07:00
Victor Zverovich
c264e641ea
Add conditional_t for pre-C++14
2019-06-04 18:50:30 -07:00
Victor Zverovich
064ce6b6c0
Specialize is_char for character types
2019-06-04 17:08:58 -07:00
Victor Zverovich
7893d85394
Clarify why we cannot have nice things
2019-06-04 08:47:25 -07:00
Victor Zverovich
5bafcb437b
Add comments about things broken in MSVC
2019-06-03 19:14:16 -07:00
Victor Zverovich
eddb84cfc0
Fix formatting of exotic characters
2019-06-03 17:08:00 -07:00
Victor Zverovich
7e42c65bb6
Document a more useful to_string_view overload
2019-06-03 11:57:33 -07:00
Victor Zverovich
0c6a6e0250
Get rid of the FILE* hack and reword apidocs
2019-06-03 10:27:00 -07:00
mocabe
1653244c69
Fix compilation issue on VS2019 ( #1186 ) ( #1191 )
2019-06-03 08:34:27 -07:00
Victor Zverovich
d54e64b3c8
Make buffer_context an alias template
2019-06-02 18:28:49 -07:00
Victor Zverovich
ec6651087d
Remove old is_constructible workarounds and replace typedefs with using
2019-06-02 16:46:45 -07:00
Victor Zverovich
4d4b8c238d
FMT_CHAR -> char_t
2019-06-02 15:03:37 -07:00
Victor Zverovich
5b7bbf8853
Revert "FMT_CHAR -> char_t"
...
This reverts commit 4c650057a0
.
2019-06-01 15:01:04 -07:00
Victor Zverovich
4c650057a0
FMT_CHAR -> char_t
2019-06-01 12:32:24 -07:00
Victor Zverovich
2833c76f22
Move char_t to template param to reduce symbol size
2019-06-01 12:14:27 -07:00
Victor Zverovich
67feef5589
Make enable_if_t more std-like and move to fmt namespace
2019-06-01 10:05:16 -07:00
Victor Zverovich
78daa50ffc
Fix handling of chrono durations with minimal signed rep
2019-06-01 09:36:37 -07:00
Christopher Di Bella
c929684e33
inlines count_code_points(basic_string_view<char8_t)
...
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.
2019-06-01 07:17:22 -07:00
Victor Zverovich
f57227a148
FMT_ENABLE_IF -> enable_if_t
2019-05-31 20:09:19 -07:00
Victor Zverovich
634f707f2b
Simplify char_t and remove msvc2013 from CI
2019-05-31 19:28:37 -07:00
Victor Zverovich
406e632bd1
result_of -> invoke_result_t
2019-05-31 08:54:32 -07:00
Victor Zverovich
49f78a427b
Demacrify
2019-05-30 21:30:29 -07:00
Victor Zverovich
637bf3c6d9
Workaround a bug in clang-format
2019-05-30 11:46:31 -07:00
Victor Zverovich
8302c2f33b
fmt::internal::declval -> std::declval
2019-05-30 09:46:10 -07:00
Victor Zverovich
d07cc2026b
FMT_EXPLICIT -> explicit, FMT_NULL -> nullptr
2019-05-30 07:42:36 -07:00
Victor Zverovich
30bce6c14c
Fix a few chrono formatting corner cases ( #1178 )
2019-05-29 18:02:26 -07:00
Victor Zverovich
e5512c5d57
Use static_assert instead of SFINAE in arg(...)
2019-05-29 13:21:24 -07:00
Victor Zverovich
afc571aedc
Document join and relax its compiler requirements
2019-05-29 11:21:05 -07:00
Victor Zverovich
291ba837f2
Remove wrong compile-time checks from printf ( #1173 )
2019-05-24 07:50:13 -07:00
Victor Zverovich
e3e470bb69
Remove deprecated format_decimal
2019-05-15 10:34:45 -07:00
Victor Zverovich
25b72fc4cd
Move <format> to tests not to confuse users
2019-05-15 09:08:42 -07:00
Victor Zverovich
d179ec5f8b
Simplify Grisu
2019-05-15 08:40:21 -07:00
denchat
2a9e8b52de
Fix advance_to() and begin() using iterator ( #1159 )
2019-05-14 08:41:11 -07:00
Victor Zverovich
2c77562b13
Fix ambiguous formatter specialization in fmt/ranges.h ( #1123 )
2019-05-12 13:03:20 -07:00
Victor Zverovich
98b3775297
Add support for exotic string_view iterators ( #1156 )
2019-05-12 11:07:49 -07:00
Victor Zverovich
b488df6cfe
Fix Grisu3 stopping conditions
2019-05-12 08:56:50 -07:00
denchat
f4dfd6e30f
Suppress all clang-target-msvc test warning in CMake and other misc fixes ( #1151 )
...
* 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
2019-05-11 11:48:27 -07:00
Victor Zverovich
a6e8ed15c4
Disable UDL templates on GCC 9 by default ( #1148 )
2019-05-11 08:58:39 -07:00
Victor Zverovich
de5da50910
Fix formatting of extreme durations ( #1154 )
2019-05-11 08:42:02 -07:00
Alex Alabuzhev
77d6036cd5
Fix unexpected trailing decimal point ( #1153 )
2019-05-11 06:34:47 -07:00
Victor Zverovich
e9bab6d028
Improve handling of large durations
2019-05-08 12:40:33 -07:00
mocabe
118d8bccc2
Fix compilation error under MSVC 19.21 ( #1140 )
2019-05-08 11:20:55 -07:00
mocabe
6828d549e8
Add FMT_ENABLE_IF_T
...
for definitions of functions which declared using FMT_ENABLE_IF
2019-05-08 11:20:55 -07:00
Ronny Krüger
ca7c1f89dc
Fixed a compile error under MSVC.
...
The #warning directive is not supported by MSVC.
To still get a message to the user we use #pragma message() under MSVC now.
2019-05-05 14:04:04 -07:00
Victor Zverovich
ca978b3d21
Fix handling of nan durations
2019-05-05 08:53:23 -07:00
Victor Zverovich
c1d430e61a
Improve handling of negative durations
2019-05-04 17:52:20 -07:00
Victor Zverovich
38a85502ed
Use the same rep type for seconds to prevent overflow
2019-05-04 09:22:09 -07:00
Greg Sjaardema
241414028d
Eliminate shadowed variable warnings from gcc-7.2
...
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.
2019-05-04 08:00:31 -07:00
denchat
29c10fbf6e
Fix DLL visibility of explicit instantiation "declaration" of internal::basic_data<void> in header format.h and the explicit instantiation "definition" in format.cc ( #1134 )
...
* 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
2019-05-02 07:49:01 -07:00
Victor Zverovich
4a4d72f917
Fix handling of invalid string in chrono formatting
2019-05-01 10:06:42 -07:00
Victor Zverovich
4c721e3a2f
Fix chrono formatting with invalid argument id ( #1132 )
2019-04-28 07:08:41 -07:00
Victor Zverovich
8d8ea21c69
Partially implement Grisu3
2019-04-27 12:17:21 -07:00
Victor Zverovich
40a7975640
Remove trailing zeros
2019-04-27 07:42:27 -07:00
Victor Zverovich
bd516e3429
Convert negative precision to zero in printf ( #1127 )
...
and remove redundant check in grisu2_prettify.
2019-04-21 07:44:04 -07:00
Victor Zverovich
5efb24dd2b
Add specialization test
2019-04-19 17:15:46 -07:00
Victor Zverovich
946498cfbc
Fix handling of zero precision
2019-04-19 15:10:12 -07:00
HE, Tao
6b20863918
fmt::ptr: support unique_ptr and shared_ptr.
2019-04-18 10:12:11 -07:00
Victor Zverovich
d306585a3f
Don't inject internal names into std ( #1120 )
2019-04-17 13:25:31 -07:00
Victor Zverovich
dc94010fa5
Remove char_traits ( #1117 )
2019-04-16 17:08:24 -07:00
Victor Zverovich
397e8dd9d5
clang-format
2019-04-15 11:39:19 -07:00
ToolsDevler
2b415b7af7
Restructure printf_arg_formatter to make it customizable
2019-04-15 11:10:31 -07:00
Victor Zverovich
5d755d0a4e
Fix handling of volatile char ( #1115 )
2019-04-14 12:34:56 -07:00
Victor Zverovich
bade46aae5
Optimize grisu using uint128_t
2019-04-13 13:44:41 -07:00
Victor Zverovich
41fbaeb3b1
Add <format> test
2019-04-13 11:37:52 -07:00
Victor Zverovich
ccd70f59ee
Workaround bogus unreachable warnings in MSVC
2019-04-11 17:59:35 -07:00
Victor Zverovich
a6ad29aa34
Update <format>
2019-04-10 09:09:34 -07:00
Victor Zverovich
52eb3fe274
Update <format>
2019-04-10 08:29:07 -07:00
Victor Zverovich
09e2ac5e46
Update <format>
2019-04-10 07:56:50 -07:00
Victor Zverovich
df4ea0c76c
Update <format>
2019-04-10 06:25:42 -07:00
Victor Zverovich
718f60accb
Fix shadowing warning ( #1105 ) and clang format
2019-04-08 19:14:32 -07:00
Bruce Mitchener
aeb5ad3ce1
Enable [[noreturn]] some.
2019-04-08 07:53:59 -07:00
Victor Zverovich
2808395481
basic_buffer -> buffer
...
This reduces symbol sizes and gets rid of shadowing warnings.
2019-04-07 20:32:28 -07:00
Victor Zverovich
07d5a86a7c
Fix warnings
2019-04-06 22:10:10 -07:00
Victor Zverovich
ab1474ef66
Workaround segfault in doxygen and apply clang-format
2019-04-06 15:55:14 -07:00
Victor Zverovich
bd8177177a
Add support for platforms without uintptr_t
2019-04-06 08:11:03 -07:00
Victor Zverovich
0302927f56
Optimize pointer formatting
2019-04-05 20:36:37 -07:00
Victor Zverovich
bb6842ba35
Simplify to_string
2019-04-05 19:15:22 -07:00
Victor Zverovich
b23c8633fa
Detect presence of uintptr_t
2019-04-05 07:43:00 -07:00
Victor Zverovich
018d8b57f6
Remove broken snprintf
2019-03-30 20:27:52 -07:00
Billy Donahue
1987db663b
clang-format
2019-03-30 07:48:53 -07:00
Billy Donahue
a6d1ad741d
handle fwrite results #1098
2019-03-30 07:48:53 -07:00
Ivan Shynkarenka
e979c782d3
Extend basic_writer with write() method for doubles with optional format_specs argument
2019-03-25 19:16:41 -07:00
Victor Zverovich
91acfe6852
Fix UBSAN warning
2019-03-22 07:56:02 -07:00
Victor Zverovich
b7e6bf9671
clang format
2019-03-21 20:51:37 -07:00
Victor Zverovich
da0ea4161a
Make compile-time checks work with fallback formatter ( #1088 )
2019-03-21 19:26:53 -07:00
mwinterb
7ad3015f5b
Added missing typename to FMT_STRING. ( #1089 )
...
* Added missing typename to FMT_STRING.
This is so that FMT_STRING can be used in a template.
2019-03-20 20:37:00 -07:00
Victor Zverovich
f0b572da05
Update wording test
2019-03-20 06:53:31 -07:00
ricco19
6d416cf674
Forward declare is_string<FILE*> specializations
2019-03-19 05:20:18 -07:00
Victor Zverovich
294fd7df96
Remove isinf workaround
2019-03-17 14:49:19 -07:00
Victor Zverovich
0faa968cc3
Make floating-point formatting locale-independent
2019-03-17 13:26:56 -07:00
Victor Zverovich
bc784d3625
Remove isnan workaround
2019-03-17 12:23:36 -07:00
Victor Zverovich
76d326a2a2
Enable grisu for general format
2019-03-17 09:48:50 -07:00
Victor Zverovich
c21c6b8c4b
Move enable_if to template params
2019-03-16 15:15:38 -07:00
Victor Zverovich
ae0b0dab9f
Remove obsolete TODO
2019-03-16 10:04:16 -07:00
Victor Zverovich
97619e27a2
More fixed precision tests
2019-03-15 10:20:20 -07:00
Victor Zverovich
a939c75956
Merge fmt/time.h into fmt/chrono.h
2019-03-14 18:07:42 -07:00
Victor Zverovich
17e4b53926
Make chrono formatting work without exceptions ( #1062 )
2019-03-14 18:01:03 -07:00
Victor Zverovich
a82b3680dc
More tests and fixed precision fixes
2019-03-13 19:47:07 -07:00
Victor Zverovich
e28429ee73
Prevent overflow with zero precision
2019-03-13 10:46:25 -07:00
Victor Zverovich
49bbf3c876
Simplify shadowing warning fix
2019-03-13 08:29:37 -07:00
Ivan Shynkarenka
e06523361d
Visual Studio 2017: warning C4456: declaration of 'result' hides previous local declaration
2019-03-11 14:15:23 -07:00
Victor Zverovich
4c66dad8c1
Refactor digit generation
2019-03-10 15:45:06 -07:00
Victor Zverovich
b1f7cca89e
stop -> handler and swap args
2019-03-10 14:43:26 -07:00
Victor Zverovich
f90d33ca12
error_ulp -> error
2019-03-10 14:29:28 -07:00
Victor Zverovich
1632f72cbe
Test get_round_direction
2019-03-10 11:14:50 -07:00
Bruce Mitchener
4523053e6f
Fix typos.
2019-03-10 07:49:33 -07:00
Victor Zverovich
8407f4cb24
Round close to zero fixed precision
2019-03-09 15:18:34 -08:00