Commit Graph

3738 Commits

Author SHA1 Message Date
Victor Zverovich 758446c80d Fix a warning (#1319) and simplify code 2019-09-19 16:00:40 -07:00
Vedran Miletić f7aedc5fc4 Fix shared build on Solaris 2019-09-19 14:12:03 -07:00
Paul Dreik 840a817ed2 add oss fuzz badge 2019-09-19 08:23:05 -07:00
Rosen Penev 79c923ba2c fmt.pc.in: Fix for cross compilation
These variables get set to /usr/lib and /usr/include , which is totally wrong in a cross compilation
environment.

Changed to standard pkgconfig values consistent with most other ones.
2019-09-16 17:18:21 -07:00
Victor Zverovich 5dc577c064 Update ChangeLog.rst 2019-09-12 18:20:48 -07:00
Victor Zverovich c6d1a94a9f Fix fallback_format (#1306) 2019-09-09 17:28:53 -07:00
Victor Zverovich 0656045d02 Fix format overload that takes text_style (#1305) 2019-09-08 18:41:02 -07:00
Victor Zverovich c85ae23c73 Add max_value 2019-09-08 09:21:30 -07:00
Victor Zverovich b3bf665764 Implement multiplication and part of assignment from pow of 10 2019-09-08 08:27:00 -07:00
Victor Zverovich 0887887e23 Implement left shift 2019-09-07 18:10:36 -07:00
Victor Zverovich ac71d853be Refactor normalize and clean up 2019-09-07 17:28:59 -07:00
Victor Zverovich 6649b8e0ca value -> bigit 2019-09-07 14:23:19 -07:00
Victor Zverovich 56b5c192a0 Add a bigint stub and reenable grisu 2019-09-07 13:50:22 -07:00
Victor Zverovich b2f0b6e44e Tweak comment 2019-09-07 08:43:35 -07:00
Victor Zverovich 3d9f3c163b Integrate new format string compilation 2019-09-07 07:01:51 -07:00
Victor Zverovich 19547d5148 Update index.rst 2019-09-06 13:27:28 -07:00
Victor Zverovich 972ffd3151 Update README.rst 2019-09-06 13:13:30 -07:00
Victor Zverovich 2ed412fa38 Update README.rst 2019-09-06 13:03:14 -07:00
gabime df4dcf2ece Fixed vs 2015 warning about unused variable when grisu is off 2019-09-06 11:29:56 -07:00
Victor Zverovich f7a4b4ab91 Make numeric alignment optional 2019-09-06 09:43:53 -07:00
Victor Zverovich 611cf0b3c6 Format octal 0 as 0 2019-09-06 07:03:47 -07:00
Victor Zverovich 58a8f2f539 Add ccache to the list of projects 2019-09-06 06:26:09 -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 fe642d7648 Clarify use of the core API in header-only mode (#1296) 2019-09-02 17:14:30 -07:00
Victor Zverovich a128b5b2cb Simplify format string compilation 2019-09-02 06:48:19 -07:00
Victor Zverovich 466128de00 Remove unused code and refactor 2019-09-01 13:08:53 -07:00
Victor Zverovich 22e98a5b6a Make compile work with user-defined types 2019-09-01 11:49:27 -07:00
Victor Zverovich f18a3f36a7 Remove string_view_metadata
string_view_metadata was introduced to make compiled format relocatable.
However, format string compilation is an optimization and therefore
adding overhead and extra complexity for relocation is undesirable.
In most cases the string will be either static or outlive compilation
and formatting and if it doesn't, it's possible to make compiled
representation relocatale by other means.
2019-09-01 11:10:49 -07:00
Victor Zverovich 7cad33563c Refactor format string compilation 2019-09-01 10:28:41 -07:00
Victor Zverovich e1ab6bc006 Simplify format string compilation 2019-09-01 08:31:32 -07:00
Victor Zverovich 24a88545d9 Add -Werror to tests 2019-08-31 09:26:45 -07:00
Victor Zverovich 422e7b9d70 Fix compile-time checks for user-defined types (#1292) 2019-08-31 08:35:38 -07:00
Victor Zverovich d1dd9d5327 Document floating-point n specifier (#1291) 2019-08-31 08:16:47 -07:00
Victor Zverovich 9a56a608ee Fix warnings (#1288) 2019-08-31 08:16:47 -07:00
Victor Zverovich c76957565c FixedEnum -> StrongEnum and make it a regression test 2019-08-31 08:16:47 -07:00
Rosen Penev 200ee6f108 Fix minor clang-tidy warnings
using instead of typedef.

climits instead of limits.h

Added missing cast to size_t.
2019-08-31 07:02:21 -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
hhb 9e2490be4c Rename precision parameter
To avoid clang warning:

fmtlib/include/fmt/chrono.h:753:32: error: declaration shadows a field of 'formatter<duration<type-parameter-0-0, type-parameter-0-1>, type-parameter-0-2, void>' [-Werror,-Wshadow]
2019-08-28 07:29:04 -07:00
Victor Zverovich 3f75e2b69e Make buffer_range public and update custom formatting docs (#1281) 2019-08-28 06:50:20 -07:00
Victor Zverovich 744302add0 Workaround broken [[deprecated]] in Intel compiler (#1273) 2019-08-28 05:58:09 -07:00
Greg Sjaardema f5556225a4 Eliminate shadow variable warning
gcc-9 gives the following shadow warning:
```
In file included from /Users/libraries/ioss/src/fmt/ostream.h:12,
                 from /Users/libraries/ioss/src/Ioss_DatabaseIO.C:59:
/Users/libraries/ioss/src/fmt/format.h: In function 'void fmt::v6::internal::parse_format_string(fmt::v6::basic_string_view<Char>, Handler&&)':
/Users/libraries/ioss/src/fmt/format.h:2442:10: warning: declaration of 'struct fmt::v6::internal::parse_format_string(fmt::v6::basic_string_view<Char>, Handler&&)::writer' shadows a global declaration [-Wshadow]
 2442 |   struct writer {
      |          ^~~~~~
/Users/libraries/ioss/src/fmt/format.h:1703:7: note: shadowed declaration is here
 1703 | using writer = basic_writer<buffer_range<char>>;
      |       ^~~~~~
```

Since the `writer` struct is only used internally in the `parse_format_string` function, its name can be changed somewhat aribtrarily to avoid conflicts with names in an outer scope.

Note that this warning is also present in the 6.0.0 release.
2019-08-27 14:29:39 -07:00
Bruce Mitchener ad3c7855e2 Fix typos. 2019-08-27 06:26:17 -07:00
Victor Zverovich 7512a55aa3 Update version 6.0.0 2019-08-26 06:23:37 -07:00
Victor Zverovich 9bd2f1f9af Temporarily disable Grisu 2019-08-26 06:11:44 -07:00
Victor Zverovich b9815cf048 Simplify part_counter 2019-08-25 08:30:59 -07:00