Rosen Penev
87cd545a1e
[clang-tidy] Replace {} with = default
...
Found with hicpp-use-equals-default
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-11-08 09:35:26 +00:00
Rosen Penev
e6e8298904
[clang-tidy] Add parentheses to macro arguments
...
Found with bugprone-macro-parentheses
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-11-08 09:35:26 +00:00
Rosen Penev
a1fb5c7337
[clang-tidy] Changes suffixes to uppercase
...
Found with hicpp-uppercase-literal-suffix
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-11-08 09:35:26 +00:00
Rosen Penev
8a411c2bca
[clang-tidy] Turn deleted function to public
...
Found with modernize-use-equals-delete
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-11-08 09:35:26 +00:00
Victor Zverovich
0047dc10a2
Mark apidoc as rst
2019-11-06 15:16:02 +00:00
Victor Zverovich
ffd05e65ed
basic_parse_context -> basic_format_parse_context per standard and document
2019-11-05 07:13:58 +00:00
Victor Zverovich
7aa58c30bf
Simplify NVCC checks
2019-10-23 11:32:35 -07:00
kent-tri
00669427df
Patch compiler error when building using nvcc
...
If you compile using `nvcc` and pass the option `--expt-relaxed-constexpr` it will crash with an internal compiler error. This modification prevents using `constexpr` in `fmtlib` when compiling using `nvcc` and prevents the crash.
2019-10-22 08:34:52 -07:00
Victor Zverovich
bb728a572a
packed_arg_bitsize -> packed_arg_bits and remove packed_arg_mask
2019-10-18 10:06:57 -07:00
Victor Zverovich
c4dc6bef24
Apply clang-format
2019-10-13 18:31:09 -07:00
Orivej Desh
b87ac4d840
Distinguish float from double
2019-10-12 11:41:24 -07:00
Orivej Desh
a927dda9bb
Use words for packed constants
2019-10-12 11:41:24 -07:00
Orivej Desh
dd11d45847
Encode types using 5 bits
...
This is needed to support more than the current 16 types.
2019-10-12 11:41:24 -07:00
Victor Zverovich
0c7650373c
Fix handling of types convertible to std::string_view
2019-10-05 06:58:37 -07:00
Victor Zverovich
ac71d853be
Refactor normalize and clean up
2019-09-07 17:28:59 -07:00
Victor Zverovich
1882b9687b
Reduce the numer of ifdefs with an empty (u)int128_t fallback
2019-09-05 18:03:47 -07:00
Deniz Evrenci
6de0454b42
Add support for built-in __int128 when available
2019-09-04 07:05:08 -07:00
Deniz Evrenci
16e3c48bb0
Move definition of FMT_USE_INT128 to core.h
2019-09-04 07:05:08 -07:00
Deniz Evrenci
8ce5f680f2
Rename internal::is_integral and internal::is_arithmetic
...
To reserve space for the type traits sharing the same name as the ones
from standard library.
2019-09-04 07:05:08 -07:00
Victor Zverovich
2fd8f9ec8a
Initial implementation of optimal compile-time formatter generation
2019-09-02 19:50:30 -07:00
Victor Zverovich
422e7b9d70
Fix compile-time checks for user-defined types ( #1292 )
2019-08-31 08:35:38 -07:00
Victor Zverovich
c76957565c
FixedEnum -> StrongEnum and make it a regression test
2019-08-31 08:16:47 -07:00
Egor Seredin
bcd9b9331a
Map not int enum to correct underlying_type ( #1286 )
...
* Map not int enum to correct underlying_type
* Use non-zero constant in TestFixedEnum
2019-08-31 06:25:38 -07:00
luncliff
345ba07f1d
Add a CUDA test
...
test cuda: import fmt in CUDA source code
Current test is only for Windows(cl.exe).
Need to test more with the other host compilers...
* Activate the test when `find_package(CUDA)` worked
* The test runs with C++14
Detailed comments in 'test/cuda-test'
test cuda: add more comment / macro check
* checks both `__NVCC__` and `__CUDACC__`
More comments for CMake and CUDA source file.
test cuda: <fmt/core.h> checks NVCC and CUDA
The header file checks 2 things.
* __NVCC__: if the compiler is from NVIDIA
* __CUDACC__: if the source code is CUDA(.cu) file
Since we can't sure all users prefer latest, Version for
`find_pacakge(CUDA)` is downgraded to 9.0.
This is the minimum version for C++14 in CUDA
2019-08-30 17:45:50 -07:00
Victor Zverovich
744302add0
Workaround broken [[deprecated]] in Intel compiler ( #1273 )
2019-08-28 05:58:09 -07:00
Victor Zverovich
1488df3395
Bump version
2019-08-24 07:31:25 -07:00
Victor Zverovich
5360ab0b59
Fix iteration over named arguments ( #1168 )
2019-08-09 11:53:07 -07:00
Victor Zverovich
e9b9b0aefa
clang-format
2019-07-18 06:28:53 +02:00
Victor Zverovich
ec24342b2b
Fix more warnings
2019-07-18 06:28:17 +02:00
Victor Zverovich
230b24944c
Fix sign conversion warnings
2019-07-17 21:18:55 +02:00
Jack Andersen
d561cb47a7
Opt-in macro to enforce use of compile-time format strings
2019-07-16 07:08:59 +02:00
Jack Andersen
699fe8e711
Remove const qualification in compile-time checks
2019-07-15 09:20:16 +02:00
Victor Zverovich
dd8cc8b0ba
Disallow passing views as lvalues
2019-07-09 12:18:48 -07:00
Victor Zverovich
b438812324
Clean up is_output_iterator
2019-07-07 12:59:55 -07:00
Victor Zverovich
8e0dcd20b3
Remove old deprecated functions
2019-07-06 07:55:52 -07:00
Victor Zverovich
6a031347e5
Remove unnecessary qualification
2019-07-03 21:14:45 -07:00
Victor Zverovich
e76446958c
Cleanup and remove deprecated visit
2019-07-03 14:31:01 -07:00
Björn Schäpers
e3488fcae2
Fix Warning
...
QtCreator (4.9) Clang Code Model (Clang 7) gives the
warning:core.h:404:11: error: an attribute list cannot appear here
core.h:116:24: note: expanded from macro 'FMT_NORETURN'
2019-06-24 08:53:35 -07:00
Victor Zverovich
1c3197b8d8
Fix warnings
2019-06-17 09:21:29 -07:00
Victor Zverovich
d32fe0f3f6
Fix hadling of nullptr
2019-06-12 09:22:36 -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
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
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
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
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
e5512c5d57
Use static_assert instead of SFINAE in arg(...)
2019-05-29 13:21:24 -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
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
5d755d0a4e
Fix handling of volatile char ( #1115 )
2019-04-14 12:34:56 -07:00
Victor Zverovich
ccd70f59ee
Workaround bogus unreachable warnings in MSVC
2019-04-11 17:59:35 -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
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