Commit Graph

94 Commits (master)

Author SHA1 Message Date
Daniel Kolesa 2077ff0752 correctly enforce symbol visibility 2020-09-19 04:16:26 +02:00
Daniel Kolesa 3cc97f6fab fix some dumb gcc warnings 2019-01-28 02:53:09 +01:00
Daniel Kolesa d7d3929226 refactor expression SFINAE tests not to use pointers 2018-01-10 00:22:09 +01:00
Daniel Kolesa b077b4fad9 respect width/precision 2018-01-08 00:46:09 +01:00
Daniel Kolesa d47aa75bd3 fix utf-16 string printing 2018-01-08 00:44:57 +01:00
Daniel Kolesa 7becc47143 use the standard trait to check for chars 2018-01-07 22:54:02 +01:00
Daniel Kolesa 96f627f792 treat chars as ints when not %s/%c and %x/%X/etc as unsigned 2018-01-07 22:53:02 +01:00
Daniel Kolesa 229b715d2c add a standard function to write a replacement character 2018-01-07 21:20:57 +01:00
Daniel Kolesa fb91f77eb0 remove the encode_u* wrappers (just use generic type-basedd ver) 2018-01-07 19:08:08 +01:00
Daniel Kolesa 51d7a62bee eliminate -Wweak-vtables warnings 2018-01-05 22:48:38 +01:00
Daniel Kolesa 58ccfbe276 direct encoding funcs to u8/u16/uw from any other UTF 2018-01-05 21:49:00 +01:00
Daniel Kolesa 61ed0ce71f printing of utf-16 and wide strings in format 2018-01-05 20:02:14 +01:00
Daniel Kolesa 723c06c612 various warning fixes with -Weverything 2018-01-03 17:13:38 +01:00
Daniel Kolesa b75f5f4881 implement utf-32 string printing in format 2018-01-01 20:59:39 +01:00
Daniel Kolesa c35f7377bf encode characters into utf-8 in format with our API 2018-01-01 03:11:00 +01:00
Daniel Kolesa d3cdbe2fcf expose unicode stuff through string slices 2017-12-31 19:12:51 +01:00
Daniel Kolesa fb2f9e3b0e add support for printing unicode and wide characters 2017-12-31 15:32:33 +01:00
Daniel Kolesa f7929a1b45 ditch char_traits in string stuff 2017-12-15 23:32:06 +01:00
Daniel Kolesa 84fc2bc9c4 do not rely on global locale when converting in format 2017-11-13 17:15:30 +01:00
Daniel Kolesa e5a21382af much better integer formatting (less stack space, better precision handling) 2017-11-13 02:13:42 +01:00
Daniel Kolesa baf0dd4ca6 MB_CUR_MAX is not a constant 2017-11-12 20:25:58 +01:00
Daniel Kolesa db28b66892 workaround the awful bullshit when formatting numbers under locale
Because of the C++ locale APIs and libstdc++ being worthless trash,
we need to resort to this kind of nonsense in order to avoid
gibberish when dealing with grouping and decimal separators.

Libc++ gets this right (comes up with ASCII style representations
when requesting locale facets dealing with char type) but for some
dumb reason libstdc++ comes up with representations that are
garbage even when using a UTF-8 locale, so I guess we'll deal
with it this way for the time being...

That said, all of this code is probably broken on systems that
don't use Unicode and honestly I don't care.
2017-11-12 20:14:26 +01:00
Daniel Kolesa 84572dfd01 use C locale in I/O and format by default
Should probably get rid of state in locale-aware APIs, too.
2017-11-12 19:15:43 +01:00
Daniel Kolesa f882292f2a get rid of gcc specific workarounds 2017-11-10 20:19:25 +01:00
Daniel Kolesa 67525af4e5 gcc/libstdc++ 7.x fixes 2017-11-03 12:56:34 +01:00
Daniel Kolesa 2ce488002a use <> for includes everywhere 2017-06-19 16:59:36 +02:00
Daniel Kolesa a191164700 make global constexpr variables inline 2017-05-06 15:09:44 +02:00
Daniel Kolesa d6a2a3f07c include all examples in generated docs 2017-05-03 02:14:27 +02:00
Daniel Kolesa b1f207bd3b hide appender_range definition 2017-04-17 17:07:24 +02:00
Daniel Kolesa 313f637e9b hide most wrapper ranges in detail namespace 2017-04-14 03:35:30 +02:00
Daniel Kolesa 1525edf3d7 type/include cleanup 2017-04-09 16:44:45 +02:00
Daniel Kolesa 62676f4222 rename octastd to libostd 2017-04-06 20:14:52 +02:00
Daniel Kolesa 4a7baa40a0 remove types.hh 2017-04-04 00:30:07 +02:00
Daniel Kolesa a4523027c2 format doc fixes 2017-04-03 17:53:41 +02:00
Daniel Kolesa d4edd42596 detailed docs for format module 2017-04-02 18:24:30 +02:00
Daniel Kolesa b86df5c016 move over to standard filesystem module (from std::experimental or std) 2017-03-10 18:31:34 +01:00
Daniel Kolesa d33ca88d0a fix bug with bool writing in format 2017-03-04 18:24:18 +01:00
Daniel Kolesa f13f11f54e format helper func with locale support 2017-03-01 19:19:46 +01:00
Daniel Kolesa 9f286f88f3 do not use digit grouping for pointers 2017-02-26 04:23:51 +01:00
Daniel Kolesa 2f4f9dd440 prevent overflow when grouping is in place 2017-02-26 03:28:23 +01:00
Daniel Kolesa 7164019e22 locale digit grouping support for integer format 2017-02-26 03:21:26 +01:00
Daniel Kolesa db991ca03d locale-aware format_spec 2017-02-26 01:04:33 +01:00
Daniel Kolesa 98fb0e3e2e fix escaping for default range print 2017-02-26 00:32:35 +01:00
Daniel Kolesa ccb0564bfc clean up range writer 2017-02-26 00:30:07 +01:00
Daniel Kolesa bd5aa4795c custom formatting is now done with format_traits
Allows definition for any type, even in any foreign namespace.
2017-02-25 19:17:08 +01:00
Daniel Kolesa e714e5f3fb add new format flag @, make it escape always (never toggle) 2017-02-25 18:56:41 +01:00
Daniel Kolesa e90b0868aa make the dash flag toggle current escaping mode in format 2017-02-25 17:33:18 +01:00
Daniel Kolesa 81ccca0e52 ios based formatting of floats (no heap alloc and basic locale awareness) 2017-02-25 04:03:36 +01:00
Daniel Kolesa 602aa7f182 clean up format 2017-02-22 03:32:03 +01:00
Daniel Kolesa 2665c20351 support for precision in integer format 2017-02-21 18:22:25 +01:00