Commit Graph

38 Commits

Author SHA1 Message Date
Victor Zverovich
60cd5ea3f2 Add support for more formattable types in ranges 2021-09-03 14:55:41 -07:00
sunmy2019
a44c8f651b
reimplement formatter<tuple_join_view> (#2457)
* reimplement `formatter<tuple_join_view>`

1. completely reimplement `formatter<tuple_join_view<Char, T...>, Char>`
2. Add some tests

* use FMT_THROW
2021-08-23 09:51:19 -07:00
Victor Zverovich
2207ea0b36 More escaping 2021-08-22 16:54:26 -07:00
Victor Zverovich
a212ff757f Escape invalid code points 2021-08-22 15:51:33 -07:00
Victor Zverovich
07d033ecb4 Fix is_printable 2021-08-22 10:37:18 -07:00
Victor Zverovich
371d8e2ee0 Escape Unicode 2021-08-22 07:55:59 -07:00
Victor Zverovich
6397095ca4 More escaping 2021-08-21 16:36:25 -07:00
Victor Zverovich
11b07a56b2 We should escape 2021-08-19 14:50:59 -07:00
Victor Zverovich
b559cfd4c0 Implement basic escaping 2021-08-19 14:12:26 -07:00
Victor Zverovich
76ee490468 Move wchar/custom char overloads to xchar.h 2021-06-05 22:57:45 -07:00
Victor Zverovich
400b953fbb Use [] instead of {} in ranges for consistency with Python format 2021-05-04 21:04:21 -07:00
Victor Zverovich
38bcc04a11 Drop range limit and cleanup tests 2021-05-04 20:53:56 -07:00
Victor Zverovich
c738c3431f Cleanup tests 2021-05-04 17:23:13 -07:00
Alexey Ochapov
53ca0cbe75 gtest: move GTest/GMock files to separate directory, update GTest/GMock usages
* all GTest/GMock files moved to `test/gtest` directory
* `CMakeLists.txt` created in `test/gtest` from `CMakeLists.txt` in `test`
* GTest/GMock target in CMake renamed to `gtest` (was `gmock`)
* CMake `gtest` target updated to export includes as "gtest/gtest.h" or "gmock/gmock.h" only
* includes in tests updated: "gtest.h" -> "gtest/gtest.h", "gmock.h" -> "gmock/gmock.h"
* removed duplications of `target_include_directories` for GTest/GMock directories (CMake manages them)
2021-04-29 07:11:49 -07:00
crbrz
9260114162
Ranges wide strings support (#2236)
* Ranges copy wchar_t

* arg_join formatter not working for wide strings

* Added ranges wide string tests

Co-authored-by: Cristi <cristi@emailaddressmanager.com>
2021-04-16 06:25:35 -07:00
Alexey Ochapov
2a25e2bf4d
Make ranges-test available with C++11 (#2114)
* make ranges-test available with C++11, fix problem with some gcc versions

* potentially fix build for MSVC 19.10, a bit reorganizing in test
2021-01-30 07:42:58 -08:00
Walter Gray
4fa4c9248f
Add tests for FMT_ENFORCE_COMPILE_STRING, fix several errors (#2038) 2020-12-24 06:40:46 -08:00
kitegi
f4ca065cfb Range support 2020-10-28 05:35:37 -07:00
Victor Zverovich
2d4fde3a2e Don't emit trailing zero for consistency with std::format 2020-09-23 09:19:12 -07:00
Victor Zverovich
2f7e08856b Disable range formatter if value type is not formattable (#1885) 2020-09-20 08:37:49 -07:00
medithe
f9f02df719
CMakeLists.txt: Clang-warnings: removed -Wno-sign-conversion (#1817)
* CMakeLists.txt: Clang-warnings: removed -Wno-sign-conversion

* test/ranges-test.cc: changed type of integer literals to unsigned

* test/format-test.cc: fixed implicit conversion changes signedness warning in clang

Co-authored-by: Martin Wührer <martin.wuehrer@artech.at>
2020-08-14 13:58:20 -07:00
Tony E Lewis
febffa4e64
Make join() handle non-const-only begin/end ranges (#1786)
See fmtlib/fmt#1784.

Add tests that demonstrate the problem and check obvious variations.
2020-07-21 12:13:00 -07:00
Barry Revzin
c66aae1652
Adding sentinel support to fmt::join(). (#1689) 2020-05-18 06:31:01 -07:00
Victor Zverovich
7f723fbcb8 Consistently namespace qualify size_t 2020-05-07 15:59:46 -07:00
Nikolay Rapotkin
85050aa2e6 Ability to join elements of std::initializer_list was added 2020-03-15 16:10:00 -07:00
Victor Zverovich
61c5a51604 Fix handling of empty tuples (#1588) 2020-03-14 07:41:08 -07:00
Victor Zverovich
0fc7bd1573 Fix ambiguity for types with dodgy conversions 2019-09-28 11:35:20 -07:00
Jeremy Ong
b4f1988c4b Provide overload for fmt::join that handles std::tuples
Address enhancement request #1322.

The overload is provided in `ranges` (original `fmt::join` exists
currently in `format.h` for historical reasons.

Tests for prvalue and lvalue tuple arguments as well as the empty
tuple are provided in `ranges-test.cc`.
2019-09-27 14:05:35 -07:00
Victor Zverovich
b2d4ca1546 Workaround an issue with std::filesystem::path being an infinitely deep range (#1268) 2019-08-21 11:22: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
2e526a664a Fix handling of output iterator in ranges 2019-03-06 08:10:46 -08:00
Victor Zverovich
58b6f8db48 Format the code using clang-format 2019-01-13 06:58:20 -08:00
Victor Zverovich
20c708bf6d Fix build on gcc 4.4 2018-10-24 10:52:02 -07:00
Victor Zverovich
479ee2a8c6 Fix MSVC build, take 2 2018-07-04 14:24:07 -07:00
Remotion
d2bfee13e2 Added quotes for strings in ranges and tuple likes. 2018-06-08 19:48:41 +02:00
Elias Kosunen
691a7a91a1 Add more compilers to CI and increase FMT_PEDANTIC warning levels (#736)
* Add a _lot_ more warnings to FMT_PEDANTIC
Fix these warnings

* Add more compilers to CI
Fix (some) of the compiler errors with them

* Enable -Werror on CI
Increase warning level on MSVC when compiling with FMT_PEDANTIC

* Add VS 2013 and 2015 to Appveyor

* Fix Appveyor tests
Formatting

* Implement requested changes
Fix some of the MSVC warnings
Implement C++11 integer_sequence

* Reintroduce appveyor-build.py

* Remove ranges-test from tests

* Remove (some) explicit warning suppressions
Fix C++ standard setting in CI

* Remove (some) explicit warning suppressions
Fix C++ standard setting in CI

* Fix test builds with C++11

* Enable pedantic warnings on tests

* Fix warnings from edits to master

* Cleanups

* Add C++11 support to ranges.h
Re-enable ranges-test
Fix a Visual Studio error about function not returning a value in printf.h
Fix a bug in .travis.yml
2018-06-06 15:57:59 +02:00
Victor Zverovich
edd5f1445d Fix compilation errors on gcc 4.4 2018-05-20 09:09:03 -07:00
Remotion
e3f7f3a2e9 Add support for ranges, containers and tuple-like types in fmt/ranges.h 2018-05-13 13:28:11 -07:00