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
Victor Zverovich
7c0d5756ff
Fix clang build
2015-03-01 18:19:56 -08:00
Victor Zverovich
c09c42f9a7
Don't do explicit instantiation in the header-only mode
2015-03-01 09:43:33 -08:00
Victor Zverovich
53010624a0
Move Windows implementation of print_colored to a separate branch
...
as it needs further testing.
2015-02-19 07:54:59 -08:00
Carter Li
3f574c1611
Silence warnings on Windows
2015-02-17 10:11:42 +08:00
Carter Li
e2583ab5f3
Use throw() when noexcept is not supported
2015-02-14 09:58:29 +08:00
Victor Zverovich
267382af39
Revert the experimental fix for print_colored that didn't work
2015-02-09 06:53:05 -08:00
Victor Zverovich
e875e3145f
Fix print_colored on Windows
2015-02-08 20:24:07 -08:00
Victor Zverovich
9368b6a4ee
Fix error handling in print_colored
2015-02-08 20:06:45 -08:00
Victor Zverovich
7004d1edf6
Update the contributed code to the used coding conventions
2015-02-08 19:54:39 -08:00
Ryuuke
bc78ca42a9
remove global variables
2015-02-08 23:10:13 +00:00
Ryuuke
4806f75469
remove unused define
2015-02-08 16:14:46 +00:00
Ryuuke
5a9dc8f991
windows cli colors revision and test case
2015-02-08 16:08:29 +00:00
Ryuuke
51ceef3dee
added color support for windows
2015-02-07 22:39:08 +00:00
Victor Zverovich
37ad436068
Fix by @dixlorenz for clang warnings "'return' will never be executed" ( #96 )
2015-02-06 21:27:31 -08:00
Victor Zverovich
59254410da
Fix a warning ( #95 )
2015-02-06 07:27:19 -08:00
Victor Zverovich
bdeffc3fdc
Fix build on Android NDK
...
where XSI-compliant version of strerror_r is used violating the docs at
http://linux.die.net/man/3/strerror_r
2015-02-05 07:04:22 -08:00
Victor Zverovich
43aebf51d6
Allow precision specifier for non-float arguments
2015-01-08 07:56:08 -08:00
Victor Zverovich
ecd2b80e8f
Get rid of using declarations for header-only config
2014-12-17 06:42:26 -08:00
Victor Zverovich
0d1eb8b1ea
Don't undefine "secure" warnings
2014-12-16 07:02:59 -08:00
Victor Zverovich
dff2137405
Don't define/undefine macros without FMT_ prefix
2014-12-16 07:01:01 -08:00
Victor Zverovich
f9fc8fd09d
Fix -Wshadow warnings
2014-12-09 07:45:54 -08:00
Victor Zverovich
b49a1b4a52
Fix linkage errors on Windows in header-only config
2014-12-09 06:32:07 -08:00
Victor Zverovich
f9c3ff244d
Merge branch 'header-only' of github.com:cppformat/cppformat
2014-12-09 06:14:04 -08:00
Victor Zverovich
6f3c095ed6
Use FMT_DISALLOW_COPY_AND_ASSIGN instead of undefined assignment operators
2014-12-03 06:16:52 -08:00
Daniel.Perry
838dc1e189
move append_float_length specialization to the header
2014-12-02 10:20:27 -05:00
Victor Zverovich
311251eb91
Complete header-only configuration support
2014-11-29 06:58:00 -08:00
Victor Zverovich
c2a6903e19
Define FMT_FUNC to nothing if FMT_HEADER_ONLY is not defined
2014-11-28 15:30:03 -08:00
Victor Zverovich
d9c605c61f
Initial support for header-only configuration
2014-11-28 06:40:57 -08:00
Daniel.Perry
bd0067ee76
made code compile under windows with level 4 warnings
2014-11-25 18:01:09 -05:00
Victor Zverovich
aca49379a5
Fix a few minor issues detected by CppCheck
...
Thanks to Dmitry Andriyankov for reporting.
2014-11-24 07:38:26 -08:00
Victor Zverovich
615c1eef6b
Fix error handling in fmt::fprintf.
2014-11-14 09:40:01 -08:00
Victor Zverovich
755ecb0311
Fix warnings
2014-10-13 08:39:38 -07:00
Victor Zverovich
d707adce5c
Fix warning in clang
2014-10-13 06:59:18 -07:00
Victor Zverovich
8b76e97062
Support compilation with exceptions disabled
2014-10-06 08:30:55 -07:00
Victor Zverovich
8c4db5081b
Fix Windows build
2014-09-29 09:17:02 -07:00
Victor Zverovich
d1ded569ff
Separate memory management and formatting
...
Array is split into an abstract Buffer class and a concrete MemoryBuffer class. BasicWriter now does all memory allocation through a Buffer object. Subclasses of BasicWriter may use different buffer types. The new BasicMemoryBuffer class uses the default MemoryBuffer.
2014-09-29 08:48:16 -07:00
Victor Zverovich
f43caef311
Fix linkage
2014-09-25 07:21:48 -07:00
Victor Zverovich
75a2ea03a7
Reduce code bloat
...
Special case C strings because there is no need to handle size for them. Add support for pre-C++11 compilers to make_type.
2014-09-25 07:10:44 -07:00
Victor Zverovich
163178eee1
Make print non-inline
2014-09-25 07:08:25 -07:00
Victor Zverovich
ab6e759291
pointer_value -> pointer
2014-09-23 08:21:58 -07:00
Victor Zverovich
beb00edf73
Store types in ArgList instead of Arg
2014-09-23 07:59:43 -07:00
Victor Zverovich
1d4640415d
Pass ArgList by value
...
This improve bloat test results:
Old stripped size: 67680 (optimized)
New stripped size: 59488 (optimized)
2014-09-21 08:08:52 -07:00
Victor Zverovich
14f2577569
Fix linkage
2014-09-19 08:45:05 -07:00
Victor Zverovich
b9a568b1dd
Add support for custom memory allocator to BasicWriter
2014-09-19 07:51:42 -07:00
Victor Zverovich
f2c9df8e9f
Move safe_strerror to anonymous namespace.
2014-09-05 08:44:41 -07:00
Victor Zverovich
88e0db8486
Test format_error_code.
2014-09-05 08:04:26 -07:00
Victor Zverovich
22f75d8b6d
Don't throw exceptions from error formatting functions. Gracefully fallback to a less descriptive message instead.
2014-09-03 08:03:05 -07:00
Victor Zverovich
5debb2aa86
Refactor error reporting to reduce duplication.
2014-08-29 08:16:10 -07:00
Victor Zverovich
605d2600f8
Improve error reporting.
2014-08-29 07:45:55 -07:00
Victor Zverovich
271fa8c908
Improve handling of format strings in custom arguments.
2014-08-29 07:23:54 -07:00
Victor Zverovich
3947a7a98c
Move check_sign to anonymous namespace.
2014-08-29 06:57:53 -07:00
Victor Zverovich
32344d9b14
Comment
2014-08-28 08:11:21 -07:00
Victor Zverovich
c57d7a506f
Factor out argument processing logic common between format and printf to FormatterBase::{next_arg,get_arg}.
2014-08-28 08:05:47 -07:00
Victor Zverovich
56fc525e98
Get rid of FormatterBase::error_.
2014-08-28 07:48:55 -07:00
Victor Zverovich
279c7a6e6a
Change "number is too big in format" to "number is too big" because the error can occur not only in the format function.
2014-08-28 06:50:52 -07:00
Victor Zverovich
526b7fc91d
Throw exception in parse_nonnegative_int if the number is too big.
2014-08-28 06:42:59 -07:00
Victor Zverovich
9646e38c3b
Don't use error_ in parse_arg_index.
2014-08-27 09:13:42 -07:00
Victor Zverovich
da0f7c0a51
Improve error reporting in parse_arg_index.
2014-08-27 09:04:51 -07:00
Victor Zverovich
42de4f1f7d
Get rid of FormatErrorReporter.
2014-08-27 08:24:31 -07:00
Victor Zverovich
dd4323f31c
Add fprintf and write docs.
2014-08-21 08:49:13 -07:00
Victor Zverovich
be00d8b272
Convert integer argument like printf does.
2014-08-19 08:49:10 -07:00
Victor Zverovich
406c6123fb
Cleanup
2014-08-19 08:47:38 -07:00
Victor Zverovich
c4a4a05d12
Improve handling of char in printf.
2014-08-19 08:14:21 -07:00
Victor Zverovich
186734cf8b
Fix warnings.
2014-08-18 07:03:12 -07:00
Victor Zverovich
adce0245dc
Fix a warning.
2014-08-17 07:53:55 -07:00
Victor Zverovich
366e852f00
Fix a warning.
2014-08-15 16:35:41 -07:00
Victor Zverovich
bb01633d19
Fix a warning.
2014-08-15 09:03:59 -07:00
Victor Zverovich
fb32161fa4
Move implementation specific stuff from format.h to format.cc.
2014-08-15 08:40:03 -07:00
Victor Zverovich
d4412a01f0
Simplify isinfinity.
2014-08-13 08:01:51 -07:00
Victor Zverovich
1a0c76a81a
Fix formatting of long double.
2014-08-13 07:51:02 -07:00
Victor Zverovich
e488a28601
Fix a warning.
2014-08-13 06:53:43 -07:00
Victor Zverovich
d3a7039e31
Implement 'll' specifier.
2014-08-12 08:36:19 -07:00
Victor Zverovich
316ae7e244
Implement more printf length specifiers.
2014-08-09 10:04:35 -07:00
Victor Zverovich
e22d657202
Fix MSVC warnings.
2014-08-08 06:51:09 -07:00
Victor Zverovich
a259c941e2
Implement 'l' length specifier.
2014-08-01 07:15:27 -07:00