Commit Graph

23 Commits

Author SHA1 Message Date
Nekotekina
bf388e5428 cfmt/StrFmt: support s128 formatting (untested) 2022-11-26 09:30:11 +03:00
Megamouse
e52386ccfb Log: ensure fmt 2022-04-24 19:11:34 +02:00
Nekotekina
160b131de3 types.hpp: implement smin, smax, amin, amax
Rewritten the following global utility constants:
`umax` returns max number, restricted to unsigned.
`smax` returns max signed number, restricted to integrals.
`smin` returns min signed number, restricted to signed.
`amin` returns smin or zero, less restricted.
`amax` returns smax or umax, less restricted.

Fix operators == and <=> for synthesized rel-ops.
2021-05-22 12:10:57 +03:00
Nekotekina
5724d2d4c7 Simplify umax
Add operator less and conversion operator.
2021-04-29 12:21:12 +03:00
Nekotekina
b5e9f09972 fmt: support numeric u128 formatting 2021-04-25 18:17:38 +03:00
Megamouse
a16d8ba3ea More random changes 2021-04-11 14:01:51 +03:00
Nekotekina
fb29933d3d Add usz alias for std::size_t 2020-12-18 12:23:53 +03:00
Nekotekina
b59f142d4e Move types.h to util/types.hpp 2020-12-12 15:12:01 +03:00
Nekotekina
6e05dcadb6 Reduce std::numeric_limits dependency
Please, stop pretending...
You need these templates for generic code.
In other words, in another templates.
Stop increasing compilation time for no reason.
2020-12-12 12:35:18 +03:00
Nekotekina
b1b67a13c6 Revert "Replace rotate utils with std::rotl" (partial)
This reverts commit 4d8bfe328b.
2020-04-14 19:45:53 +03:00
Nekotekina
032e7c0491 Replace utils::cntlz{32,64} with std::countl_zero 2020-04-14 16:05:58 +03:00
Nekotekina
c0f80cfe7a Use attributes for LIKELY/UNLIKELY
Remove LIKELY/UNLIKELY macro.
2020-02-05 10:42:34 +03:00
Nekotekina
5b9df53c13 C-style cast cleanup (partial)
Replace C-style casts with C++ casts.
2019-11-29 00:35:23 +03:00
Nekotekina
ec2db8edbc Correct get_int_t to get_uint_t.
Add get_sint_t.
2019-07-29 00:12:07 +03:00
Eladash
9d9e158b9a Make more use of the new get_int_t 2019-07-09 11:52:34 +03:00
JohnHolmesII
d0eae7bab1 Fix -Wsign-compare a little bit
Explicitly mark loop types (per review)
2019-06-28 01:45:29 +03:00
Nekotekina
ed9fb8405b Move rotate/cntlz/cnttz helpers to Utilities/asm.h 2018-09-08 00:32:04 +03:00
Nekotekina
d5107aab47 cfmt improved 2017-05-19 01:13:23 +03:00
Nekotekina
a2200bd01e Speculative fix for fmt::format 2017-03-05 21:42:54 +03:00
Nekotekina
0f87c4485d Silly macro removed-2 2016-08-14 18:19:42 +03:00
Nekotekina
3cd2f735a7 Fmt fix 2016-08-06 13:39:01 +03:00
Nekotekina
d646fbb94f Fmt/Log fixes 2016-08-05 20:59:25 +03:00
Nekotekina
5a36c57c57 Formatting system improved
`unveil<>` renamed to `fmt_unveil<>`, now packs args to u64 imitating va_args
`bijective...` removed, `cfg::enum_entry` now uses formatting system
`fmt_class_string<>` added, providing type-specific "%s" handler function
Added `fmt::append`, removed `fmt::narrow` (too obscure)
Utilities/cfmt.h: C-style format template function (WIP)
Minor formatting fixes and cleanup
2016-08-04 21:34:00 +03:00