Commit Graph

20 Commits

Author SHA1 Message Date
353cf839d4 use nested namespace declarations 2017-01-05 15:06:49 +11:00
6d079554a6 format: fix escaped percent before value specifier 2016-12-06 13:37:54 +11:00
fad44bd1f7 format: allow %! specifier for all types
If we allow the %! specifier for all types it greatly simplifies
handling of format strings in templated code, or code with non-trivial
typedefs.
2016-09-27 15:23:33 +10:00
de48f75e96 format: fix transcription of zero values to strings
an iteration condition terminated the write when a value was zero rather
than when all numerals were written. instead, iterate over the remaining
numerals.

fixes printf("%zu", 0u)
2016-08-10 17:38:39 +10:00
c8d8067af2 format: add unsigned char write method
unsigned char sometimes arises from string literals
2016-08-03 18:10:09 +10:00
c26c687912 format: set ostream precision as if for strings
ostream conversions are converted to strings anyway, so we should treat
them as such earlier in the process.
2016-07-28 16:13:23 +10:00
fad8181842 format: allow undersize integers for conversion 2016-07-28 16:13:23 +10:00
a40e09ed97 format: write c_str as %s by default, support c_str as %p 2016-07-28 14:18:47 +10:00
b4640d64d8 format: use const-ref over rval-ref for value params 2016-07-28 14:18:47 +10:00
8cc4c1e82a format: reimplement format rendering
requires literal string arrays, and implements more of the specifier
specification. does not implement 'n' or '$' specifiers. falls back to
snprintf for real arguments.
2016-07-28 13:39:27 +10:00
27800de3a0 format: avoid cast warnings for exception constructor 2016-04-28 16:09:14 +10:00
df9d0ce432 format: add invalid_specifier exception 2016-04-27 16:12:24 +10:00
61ba8e5186 format: add char specialisation to is_type_specifier 2016-04-27 16:08:28 +10:00
08e688bc1e format: add basic hex specifier support 2016-04-14 18:54:52 +10:00
40b6cfe558 format: add integer type specifier 2016-02-02 16:50:28 +11:00
4ac0139657 format: add '!' coercion format specifier
using in place of the format '!' will force a type coercion to string
before rendering.
2016-02-02 16:49:45 +11:00
1525ad124b format: add unsigned and float specifiers 2016-01-28 12:58:31 +11:00
7cd20bb64d format: add specifier detection for fs::path 2016-01-20 16:37:45 +11:00
7ccad71e6e format: recognise specifiers for char*, size_t 2015-09-21 16:34:15 +10:00
f451e5555e format: add trivial printf wrapper 2015-07-21 01:37:45 +10:00