Commit Graph

320 Commits

Author SHA1 Message Date
vitaut
ef710dee6c Add sprintf overload for wide strings
and fix an issue in formatting user-defined objects.
Thanks to @ScottLangham
2015-09-18 16:26:41 -07:00
vitaut
79d8f59906 Implement formatting of objects with (s)printf. 2015-09-08 08:36:20 -07:00
vitaut
c3ba615c65 Fix warnings 2015-08-07 07:34:58 -07:00
vitaut
ca7478144d Fix warnings 2015-08-07 07:08:46 -07:00
vitaut
ecdc7ec1f1 Fix more warnings 2015-08-04 08:01:28 -07:00
vitaut
7fa17fe772 Fix warnings 2015-08-04 07:55:33 -07:00
Radu Popescu
0affb23560 fixed #190 Argument shadowing and Clang pedantic support 2015-08-04 12:52:44 +02:00
vitaut
200037683e Initialize next_arg_index_ in ctor (#187) 2015-07-28 08:10:46 -07:00
vitaut
0eac037416 Get rid of the BasicFormatter::start_ 2015-07-28 06:46:41 -07:00
vitaut
6484a15ca0 Fix MSVC warnings 2015-07-08 07:35:57 -07:00
vitaut
c669cbedf8 Rename None to Null because of conflict with an xlib.h macro 2015-07-07 07:05:17 -07:00
vitaut
7154238d45 Add terminating null character in UTF coverters 2015-06-27 09:11:15 -07:00
vitaut
ba09c1b56e Fix windows build 2015-06-26 09:23:11 -07:00
vitaut
438bd9b0e6 Add BasicCStringRef to represent a null-termated string (#100)
and use it instead of BasicStringRef in cases that assume that the
string is null-terminated such as POSIX function and format string
parser.
2015-06-26 07:43:54 -07:00
vitaut
8ab665afbc Only use death tests if available 2015-06-22 08:17:23 -07:00
vitaut
147e5ebbbc Move casts to CharTraits for custom character types 2015-06-17 07:21:16 -07:00
vitaut
270069beda Use arg visitor when formatting printf argument
and get rid of ignore_incompatible_str.
2015-06-16 07:36:32 -07:00
vitaut
9b6b3382e3 Don't use ignore_incompatible_str in ArgFormatter 2015-06-15 07:15:28 -07:00
vitaut
63f6c10449 Suppress a warning about unused strerror_r. 2015-06-14 09:36:23 -07:00
vitaut
8725d07d8b Place the anonymous namespace within the fmt namespace
for header-only configuration as suggested by Alf Steinbach.
2015-06-12 07:56:58 -07:00
vitaut
24c309fbfa Don't use windows.h if FMT_USE_WINDOWS_H is set to 0 2015-06-12 07:15:57 -07:00
vitaut
9d09214e7a Use textual representation for bool by default (#170) 2015-06-11 09:00:06 -07:00
vitaut
fd5c2e909b Report error when using precision with char 2015-06-11 08:58:31 -07:00
vitaut
fccff7be5f Minor tweaks to the named arguments support code
* Restore privacy of FormatterBase
* Pass BasicStringRef by value
* Comment on why some overloads of arg are deleted
* Set next_arg_index_ in check_no_auto_index
* A few minor stylistic changes for simplicity & consistency with other code
2015-06-11 07:19:00 -07:00
Victor Zverovich
834618ee28 Merge pull request #174 from jamboree/feature/named-arg
Fix name parsing
2015-06-11 06:03:34 -07:00
jamboree
3c99ed4498 Fix name parsing 2015-06-11 12:03:22 +08:00
vitaut
a98583dde3 Move ArgList::Map to the internal namespace and rename to ArgMap
since it shouldn't be a part of the public API. Also break long lines.
2015-06-10 08:49:22 -07:00
jamboree
7487bde587 Support named arguments 2015-06-10 09:32:59 +08:00
vitaut
8949a2e941 Fix formatting 2015-06-08 06:53:18 -07:00
jamboree
54a6cb34c7 Support runtime width specification 2015-06-04 13:59:37 +08:00
vitaut
9ca1ce293e Make instantiation of BasicData consistent with its definition 2015-05-23 08:04:06 -07:00
vitaut
804a74c998 Explicitly instantiate BasicData<void>
https://github.com/ampl/mp/issues/55#event-305206703
2015-05-14 12:58:42 -07:00
vitaut
67ce394256 Undefine Windows min/max macros (#152)
because they break std::min/max. This only affects non-default
header-only configuration and can be disabled by defining
FMT_WIN_MINMAX.
2015-04-30 07:48:36 -07:00
vitaut
d4ea2d7fcb Add ArgVisitor::report_unhandled_arg
and get rid of FMT_RETURN_AFTER_THROW.
2015-03-26 08:55:20 -07:00
vitaut
66915785dd Get rid of FMT_NORETURN because it breaks when FMT_EXCEPTIONS=0 2015-03-25 07:24:26 -07:00
vitaut
1addec97bc Rename _ERR to ERROR_STR
Identifiers beginning with an underscore and an uppercase letter are
reserved [17.4.3.2.1].
2015-03-21 20:16:36 -07:00
vitaut
da052ae821 Fix bogus warnings 2015-03-21 07:53:39 -07:00
Naios
ef7d4879e4 Fix build under g++-4.9, SunOS 5.11 i386 i86pc Solaris
* thanks @VolodymyrLavrenchuk for pointing this out.
2015-03-18 10:34:47 +01:00
vitaut
df47d819b9 Suppress bogus MSVC warning 2015-03-16 18:53:14 -07:00
vitaut
4825fb4a0d Add default value for None's template argument 2015-03-16 08:43:33 -07:00
vitaut
d08c4ba84a Merge branch 'master' of github.com:cppformat/cppformat 2015-03-15 06:35:06 -07:00
vitaut
4547523e19 Make dummy strerror_r and strerror_s inline and remove old comment 2015-03-15 06:34:59 -07:00
Carter Li
80d1dd29b7 Feedback 2015-03-15 09:31:13 +08:00
Carter Li
c97c0fbbc9 Merge remote-tracking branch 'upstream/master' 2015-03-15 09:23:19 +08:00
vitaut
e1776acd19 Handle the result of XSI-complint version of strerror_r correctly 2015-03-14 14:05:02 -07:00
vitaut
341b98c6e2 Detect safe strerror variants using function overloading instead of macros 2015-03-14 13:39:33 -07:00
Carter Li
2d4631a580 Silence -Wunused-parameter 2015-03-14 14:54:37 +08:00
Carter Li
593d3aef9e Improve behaviors when disabling exceptions 2015-03-14 14:37:02 +08:00
cstamford
55836caa8d Added the define FMT_SWPRINTF to allow compilation under TDM-gcc (and possibly other MinGW distributions). 2015-03-10 07:04:31 +00:00
Victor Zverovich
7c0a23329e Update copyright notices 2015-03-03 21:04:45 -08:00