Commit Graph

2358 Commits

Author SHA1 Message Date
Jonathan Müller
52aabbe7ef Workaround MSVC lookup issue in ArgFormatterBase
Fixes #505.
2017-05-05 14:40:58 +02:00
Quentin Buathier
4423490d0b Don't include the world with WIN32_LEAN_AND_MEAN (#503) 2017-05-03 21:22:01 +02:00
郭荣飞
d49f206183 fmt::internal::is_streamable works on gcc 4.7
i test the the code on https://gcc.godbolt.org/, and only gcc 4.7 works,
gcc 4.6 fail to complie
2017-04-16 21:27:28 -07:00
Graham Inggs
7a4ac9ec9c add SOURCELINK_SUFFIX for compatibility with Sphinx 1.5
With Sphinx 1.5, this is needed by searchtools.js to display the source
snippets (see sphinx-doc/sphinx#2454).

With earlier Sphinx versions, this is a no-op because the undefined variable
will evaluate to an empty string.
2017-04-15 08:42:05 -07:00
Ivan Shynkarenka
82bb4f4e89 Fix Visual Studio 2017 new warning (C4244: 'argument': conversion from 'int' to 'const char', possible loss of data) 2017-04-15 08:38:43 -07:00
effzeh
73ca9948fe Fix FormatBuf implementation (#491)
Fixes #491 (and probably #480) Before, the put-area of the custom streambuf
implementation was (sometimes) incorrectly extended beyond the writeable buffer.
The new implementation is in some cases not as efficient as the old, but avoids
to write into uninitialized memory.
2017-04-08 09:07:33 -07:00
Arthur Danskin
cbac016cce %.f should have zero precision, not default precision 2017-04-08 07:18:10 -07:00
Victor Zverovich
c03f55ec3a Add Kodi (xbmc) to the list of projects using fmt 2017-03-11 08:28:52 -08:00
Victor Zverovich
fbc8ea8c3e False -> FalseType (#483) 2017-03-08 07:17:08 -08:00
Pierre Kestener
6c3aa28c94 fix for nvcc_wrapper compiler 2017-03-08 06:20:52 -08:00
Sean LK
e3b5d806a8 Don't bring Arg struct into global namespace
This fixes compiling fmtlib in header-only mode when user code also has
something called 'Arg' defined. Now qualifying Arg struct with internal
namespace.
2017-03-08 06:19:11 -08:00
Victor Zverovich
cc736e7611 Remove redundant include (#479) 2017-03-03 06:06:34 -08:00
Victor Zverovich
789ebea863 Merge branch 'printf' of github.com:fmtlib/fmt 2017-02-26 07:17:38 -08:00
Victor Zverovich
6f8006c2ce Add printf overloads that takes a writer (#476) 2017-02-25 09:58:42 -08:00
Dominik Schmidt
589b93de45 Add default copy constructor to SystemError (#475)
* Add default copy constructor to SystemError
* Add FMT_DEFAULTED_COPY_CTOR macro
2017-02-25 09:37:06 -08:00
Victor Zverovich
db0d54f855 Fix error on MinGW 2017-02-25 09:00:56 -08:00
Victor Zverovich
703960aa54 Merge branch 'master' of github.com:fmtlib/fmt 2017-02-24 07:06:12 -08:00
Victor Zverovich
e208fbff52 Document which header defines formatting functions 2017-02-24 07:06:05 -08:00
Alexey Gorishny
20089c23ca Added missing FMT_OVERRIDE specifier to FormatBuf::overflow (#473) 2017-02-22 20:55:15 +01:00
Rich E
ad6d78f2a8 added FMT_API declarations where needed when using FMT_EXPORT from a separate dll 2017-02-12 12:14:58 -05:00
olivier80
a00006119f Add join argument allowing formating list of values separated by a (#466)
Add join argument allowing formating list of values separated by a
string. Each value is formated according the format specifier.
2017-02-08 06:55:12 -08:00
Magnus Bjerke Vik
bc6af7548b Fix Android not being detected with latest NDK toolchain (#458)
When using the NDK 13b toolchain standalone or with CMake, ANDROID is not defined,
but __ANDROID__ is defined instead.
2017-01-20 11:20:43 +01:00
Andreone
67662702aa allow to stream user defined types in a MemoryWriter (#456)
* allow to stream user defined types in a MemoryWriter

* fix indent

* follow Google C++ Style

* make code c++98 compatible

* fix macro usage

* disable ability to stream user defined types if not at least c++11

* fix for disable ability to stream user defined types if not at least c++11

* use FMT_STATIC_ASSERT
2017-01-19 20:47:43 +01:00
Victor Zverovich
9e9ad57f58 Workaround an nvcc bug 2017-01-19 06:24:15 -08:00
Calum Robinson
a2596d685d Fix missing intrinsic when included from C++/CLI
Managed C++ code doesn't have the _BitScanReverse* intrinsics, we must use the fallback code for count_digits etc.
2017-01-18 06:23:25 -08:00
mojoBrendan
d8754af063 Allow %s as generic format specifier in printf (#453)
* Allow %s as generic format specifier in printf

Signed integers are formatted as %d
Unsigned integers are formatted as %u
Doubles are formatted as %f
Chars are formatted as %c
Void Pointers are formatted as %p

* Remove '%S' handling and use visitor for generic format strings

* Default for floating point is now "%g" rather than "%f"
2017-01-14 11:45:48 -08:00
Jean-Charles Lefebvre
e0251fdcef BasicContainerWriter utility added 2017-01-05 20:44:35 -08:00
Jean-Charles Lefebvre
e1689cb985 Custom FormatSpec (#439) (#444)
* A custom FormatSpec type can be passed as a template argument to the ArgFormatter chain (#439)

* Corrected nested-name-specifier error

* Spec template argument defaulted to FormatSpec

* Forward declaration of FormatSpec

* Style

* Style (part 2)

* Style (part 3)
2016-12-30 11:29:40 -08:00
Eric Fiselier
b9aaa507fc Don't export the -std=c++11 flag from the fmt target 2016-12-29 16:04:16 -08:00
Victor Zverovich
02553d13a0 Use https to fetch dependencies from github 2016-12-29 10:44:02 -08:00
Andrey Glebov
db780cb119 Add std::basic_string allocator support to StringRef, StringBuffer and relatives (#441)
* - added basic_string allocator support to BasicStringRef, BasicCStringRef, BasicWriter::str, StringBuffer and BasicStringWriter

* - removed templated str() and to_string() function
- code style fixes
2016-12-26 08:36:56 -08:00
Victor Zverovich
fac5546321 Fix test compilation for FreeBSD (#433) 2016-12-14 06:28:41 -08:00
Victor Zverovich
796beaaddb Fix collision with global convert function (#425) 2016-11-19 12:05:49 -08:00
Victor Zverovich
def687462c Fix signbit detection (#423) 2016-11-14 20:14:52 -08:00
alabuzhev
25f8ad13dd Correction of 418 (#420) 2016-11-11 18:27:39 +01:00
alabuzhev
1d2049b53e Issue #418 - Minimal supported library subset (#419) 2016-11-10 20:29:12 +01:00
Victor Zverovich
f5b1c16e2c Add version macro FMT_VERSION (#411) 2016-11-07 19:04:44 -08:00
Victor Zverovich
cfd00af37a Fix warnings on C++98 2016-11-06 12:58:49 -08:00
Victor Zverovich
6274401919 Fix warnings 2016-11-06 12:37:31 -08:00
Victor Zverovich
2fa4655af6 Fix warning in FMT_STATIC_ASSERT on older GCC (#414) 2016-11-06 11:48:01 -08:00
Jonathan Müller
8cef95f7c3 Create pull_request_template 2016-11-06 20:22:43 +01:00
Victor Zverovich
922ae4896b Add CONTRIBUTING file 2016-11-06 11:00:58 -08:00
Chen Hayat
05ba3e7888 Fix Klockwork compilation warning 2016-11-06 10:01:55 -08:00
Victor Zverovich
1daddec151 FMT_NULLPTR -> FMT_NULL and improve formatting 2016-11-06 09:05:58 -08:00
Jonathan Müller
d8867a2b07 Fix missing '>' 2016-11-05 21:09:31 +01:00
Jonathan Müller
6c0125785b Add extern templates for format_float
Fixes #413.
2016-11-05 21:03:40 +01:00
alabuzhev
49ccb2e449 Using FMT_NULLPTR instead of literal 0 2016-11-03 06:39:40 -07:00
Victor Zverovich
7ce7def515 argument index -> argument id 2016-11-01 17:00:59 -07:00
Lectem
8f455c10b0 fix newer clang warnings 2016-11-01 07:05:34 -07:00
Jonathan Müller
e599fe7436 Add 3.0.1 Changelog entry 2016-11-01 10:49:34 +01:00