Victor Zverovich
7ae8bd7073
basic_format_arg -> basic_arg, Buffer -> buffer
2017-02-05 06:09:06 -08:00
Victor Zverovich
aaa0fc396b
Improve compatibility with old compilers and fix test
2017-01-22 12:16:16 -08:00
Victor Zverovich
ec15ef7b7b
Replace operator<< with write function
2017-01-22 10:00:34 -08:00
Victor Zverovich
8428621ddc
BasicWriter -> basic_writer
2016-12-30 12:26:12 -08:00
Victor Zverovich
b2a0d8914a
Merge value and MakeValue
2016-12-30 09:25:01 -08:00
Victor Zverovich
acd1811c50
Value -> value
2016-12-30 08:05:26 -08:00
Victor Zverovich
42a319074c
Parameterize Value on context
2016-12-29 18:07:05 -08:00
Victor Zverovich
d705d51671
Parameterize basic_format_arg on context ( #442 )
2016-12-29 15:25:22 -08:00
Victor Zverovich
422236af7c
Don't erase writer type
2016-12-28 07:55:33 -08:00
Victor Zverovich
abb6996f36
MakeArg -> make_arg
2016-12-27 07:55:44 -08:00
Victor Zverovich
ee1651ce07
Handle empty format_arg state
2016-12-27 07:43:25 -08:00
Victor Zverovich
d86e51e9c1
Don't inherit basic_format_arg from internal::Value
2016-12-24 07:46:50 -08:00
Victor Zverovich
6cba8fe9ba
Move stuff out of internal::Value
2016-12-15 07:51:40 -08:00
Victor Zverovich
e1ee5bf0ba
Replace StringValue with StringRef
2016-12-11 21:13:54 -08:00
Victor Zverovich
0854f8c3bf
Parameterize formatting argument on char type.
2016-12-11 15:43:11 -08:00
Victor Zverovich
9cf6c8fdc6
Get rid of fmt::internal::Arg
2016-11-26 10:21:31 -08:00
Victor Zverovich
d4084ac5b1
Get rid of ArgVisitor
2016-11-20 09:11:13 -08:00
Victor Zverovich
c9dc41ab3f
Replace ArgVisitor::visit with a free visit function
2016-11-19 07:59:54 -08:00
Victor Zverovich
9998f66f8c
Replace formatter with context
2016-11-06 18:59:17 -08:00
Victor Zverovich
2bba420337
Pass writer directly to format_value ( #400 )
2016-10-26 17:54:11 -07:00
Victor Zverovich
b656a1c133
Make value the second argument to format_value
2016-10-25 06:19:19 -07:00
Victor Zverovich
edf98792a5
Pass writer to format_value
2016-10-25 05:55:40 -07:00
Victor Zverovich
be613204ab
Char -> char_type
2016-10-22 08:19:19 -07:00
Victor Zverovich
f85d5f4dac
BasicFormatter -> basic_formatter
2016-10-22 08:04:20 -07:00
Victor Zverovich
65a8c2c343
format_arg -> format_value
2016-10-02 08:49:10 -07:00
Victor Zverovich
43c0095aa3
Refactor type mapping
2016-08-26 08:50:09 -07:00
Victor Zverovich
fc73e10620
ArgList -> format_args
2016-08-25 08:50:07 -07:00
Victor Zverovich
f19d8f9655
Improve error reporting ( #357 )
2016-08-16 07:08:53 -07:00
Victor Zverovich
c9bb5468b6
Fix clang warning
2016-06-14 15:42:32 -07:00
Victor Zverovich
96c28f748d
Detect if lconv contains thousands_sep
2016-05-23 07:41:22 -07:00
Victor Zverovich
cc9b051d12
Move format_system_error to the public API ( #323 )
2016-05-13 07:19:39 -06:00
Victor Zverovich
90730e706b
Move ostream support to ostream.{h,cc}
2016-05-06 07:37:20 -07:00
Victor Zverovich
afd67497de
cppformat -> fmt
2016-04-24 09:06:12 -07:00
vitaut
bfdca8b576
Make ArgVisitor public and document it
...
Also remove unnecessary namespace qualification.
2016-04-20 09:11:33 -07:00
Michael Winterberg
8f4b8edb8b
Added test of error code that forces the insufficient buffer code path.
2016-03-04 17:47:37 -08:00
vitaut
3ecad55910
Fix sign conversion warnings
2016-03-02 07:53:14 -08:00
Mario Werner
d411aa165e
use quotes for including cppformat headers from the tests
2016-02-02 16:58:41 +01:00
Mario Werner
fee52f79b8
update the includes in the tests to get rid of the deprecated warnings
2016-01-30 22:33:37 +01:00
Mario Werner
5e7ab2f4ea
major cleanup of the test folders CMakeLists.txt
...
The new code does not rely on globally defined include directories
anymore. Additionally a lot of conditional code and has been removed
which improves readability a lot.
2016-01-29 16:21:17 +01:00
vitaut
6ced4230f4
Initial support for custom formatters
2015-12-02 08:41:05 -08:00
vitaut
6cff6d8137
Use overloaded operator<< for enums if available ( #232 )
2015-11-24 08:18:19 -08:00
vitaut
9c03176e6b
Fix util-test
2015-11-13 15:16:10 -08:00
vitaut
d6d019aa12
Don't assume that StringRef::compare returns +/-1
2015-11-11 06:44:57 -08:00
vitaut
aa741bafe6
Don't assume that char_traits::compare returns +/-1 ( #225 )
2015-11-10 06:40:20 -08:00
vitaut
8b86a74ad5
Allow formatting C strings as pointers ( #223 )
2015-11-09 07:17:36 -08:00
vitaut
7c24973637
Format (un)signed char as integer by default ( #217 )
2015-11-05 20:46:22 -05:00
vitaut
ae48a4c6f9
Add missing include
2015-10-22 08:56:52 -07:00
vitaut
f080b62047
Implement StringRef comparison operators
...
and use lexicographical comparison (#183 )
2015-10-22 08:41:42 -07:00
vitaut
c3ba615c65
Fix warnings
2015-08-07 07:34:58 -07:00
vitaut
a8a2982b9a
Fix test
2015-08-07 07:13:43 -07:00
vitaut
ca7478144d
Fix warnings
2015-08-07 07:08:46 -07:00
vitaut
200037683e
Initialize next_arg_index_ in ctor ( #187 )
2015-07-28 08:10:46 -07:00
vitaut
8ab665afbc
Only use death tests if available
2015-06-22 08:17:23 -07:00
vitaut
9d09214e7a
Use textual representation for bool by default ( #170 )
2015-06-11 09:00:06 -07:00
vitaut
8d2559bd96
Reduce compiled code size
...
If the number of arguments is less than MAX_PACKED_ARGS, pass
the arguments as a Value array rather than Arg array.
2015-04-20 10:02:41 -07:00
vitaut
62c483c940
Test EnableIf
2015-04-20 08:08:02 -07:00
vitaut
3a5573ac6e
Revert commit 3c3ae4e319
2015-03-27 07:36:26 -07:00
vitaut
3c3ae4e319
MakeValue -> MakeArg
2015-03-25 07:04:16 -07:00
vitaut
00df5c91f3
Merge Value into Arg
2015-03-25 06:48:21 -07:00
vitaut
cf04d98d06
Pass as many types as possible in a single integer to reduce code bloat
2015-03-24 08:55:40 -07:00
Shauren
a445e727c2
Added support to format more than 16 arguments with printf API when using variadic templates
2015-03-20 21:31:10 +01:00
vitaut
906432161b
Make Buffer part of the public API
2015-03-20 06:31:24 -07:00
vitaut
2adbfa4af7
Test IsConvertibleToInt with a C++11 enum
2015-03-18 11:02:37 -07:00
Victor Zverovich
5821aec7b9
Implement printing of values that are convertible to int such as enums
2015-03-10 07:53:46 -07:00
Victor Zverovich
642b72cd91
Fix StringRef test
2015-02-24 09:52:16 -08:00
Victor Zverovich
5b0a9bbe85
Improve StringRef test
2015-02-17 06:45:45 -08:00
Carter Li
3f574c1611
Silence warnings on Windows
2015-02-17 10:11:42 +08:00
Victor Zverovich
ed92af29b3
Add missing ')'
2014-10-30 13:58:16 -07:00
Victor Zverovich
14984acd27
Fix UTF conversion tests
2014-10-30 13:00:44 -07:00
Victor Zverovich
daca48cb15
Fix MSVC build
2014-10-30 12:20:08 -07:00
Victor Zverovich
cabe5bddb4
Fix util-test
2014-10-30 08:07:28 -07:00
Victor Zverovich
10d83aaa52
Test that StringRef size computation
2014-10-30 06:27:44 -07:00
Alexey Morozov
4d3126c567
sign-compare warnings fixes
2014-10-14 03:28:47 +07:00
Victor Zverovich
5189274797
Fix warnings
2014-10-13 06:46:07 -07:00
Victor Zverovich
fae3ae67b9
Fix util-test
2014-10-01 09:32:31 -07:00
Victor Zverovich
03f7f99f4c
Fix build on pre-C++11 compilers
2014-10-01 08:24:47 -07:00
Victor Zverovich
8b9a6e03f6
Test buffer
2014-10-01 08:12:10 -07:00
Victor Zverovich
98a25ec7cb
Test Buffer
2014-09-30 07:30:27 -07:00
Victor Zverovich
810f42c0c7
Fix util-test on Windows, take 2
2014-09-29 09:59:49 -07:00
Victor Zverovich
55a16eaec7
Fix util-test on Windows
2014-09-29 09:37:33 -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
b2bd63d2d9
Test ArgList
2014-09-25 09:11:51 -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
ae8bc36e57
MakeArg -> MakeValue
2014-09-24 08:07:50 -07:00
Victor Zverovich
ec1aea34e6
Refactor type processing
2014-09-24 07:48:45 -07:00
Victor Zverovich
ab6e759291
pointer_value -> pointer
2014-09-23 08:21:58 -07:00
Victor Zverovich
d2973766ea
ArgBase -> Value
2014-09-23 08:11:03 -07:00
Victor Zverovich
beb00edf73
Store types in ArgList instead of Arg
2014-09-23 07:59:43 -07:00
Victor Zverovich
f2c9df8e9f
Move safe_strerror to anonymous namespace.
2014-09-05 08:44:41 -07:00
Victor Zverovich
93bcad6d8e
Fix Windows build.
2014-09-03 08:10:20 -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
271fa8c908
Improve handling of format strings in custom arguments.
2014-08-29 07:23:54 -07:00
Victor Zverovich
8f8fd769ee
Fix Fix https://github.com/cppformat/cppformat/issues/50 in tests too.
2014-07-29 07:50:05 -07:00
Victor Zverovich
7a83dcd23e
Mind the lifetime.
2014-07-28 13:30:09 -07:00
Victor Zverovich
7e40ca6a9c
Fix a warning.
2014-07-28 09:08:21 -07:00
Victor Zverovich
4d049cf598
More fixes for https://github.com/cppformat/cppformat/issues/50 .
2014-07-28 08:41:50 -07:00
Victor Zverovich
75b5eb4b9d
More fixes for https://github.com/cppformat/cppformat/issues/50 .
2014-07-27 15:09:05 -07:00
Victor Zverovich
5d4803a567
More fixes for https://github.com/cppformat/cppformat/issues/50 .
2014-07-27 12:53:42 -07:00
Victor Zverovich
ee24839cbd
Fix tests.
2014-07-24 09:07:43 -07:00
Victor Zverovich
e2a66c58e5
Simplify and test ArgVisitor.
2014-07-16 07:55:31 -07:00