terminal/src/til/ut_til
Dustin L. Howett 66fd9c367d
Add til::static_map, a constexpr key-value store (#7323)
This is based on (cribbed almost directly from) code written by the
inimitable @StephanTLavavej on one of our mailing lists.

This is a nice generic version of the approach used in
JsonUtils::EnumMapper and CodepointWidthDetector: a static array of
key-value pairs that we binary-search at runtime (or at compile time, as
the case may be.)

Keys are not required to be sorted, as we're taking advantage of
constexpr std::sort (VS 16.6+) to get the compiler to do it for us. How
cool is that?

static_map presents an operator[] or at much like
std::map/std::unordered_map does.

I've added some tests, but they're practically fully-solveable at compile
time so they pretty much act like `VERIFY_IS_TRUE(true)`.
2020-08-18 18:05:14 +00:00
..
BaseTests.cpp Fix the x86 build and re-enable x86 CI (#6467) 2020-06-11 17:04:42 +00:00
BitmapTests.cpp Adjusts High DPI scaling to enable differential rendering (#5345) 2020-04-22 14:59:51 -07:00
CoalesceTests.cpp Add support for per-profile tab colors (#7162) 2020-08-07 16:07:42 -07:00
ColorTests.cpp Switch the Cascadia projects to til::color where it's easily possible to do so (#5847) 2020-05-15 22:43:00 +00:00
DefaultResource.rc Introduce til::some (#4123) 2020-01-09 09:07:52 -08:00
MathTests.cpp add til::math, use it for float conversions to point, size (#5150) 2020-03-27 22:48:49 +00:00
OperatorTests.cpp Move ConPTY to use til::bitmap (#5024) 2020-03-23 15:57:54 +00:00
PointTests.cpp Adjusts High DPI scaling to enable differential rendering (#5345) 2020-04-22 14:59:51 -07:00
product.pbxproj Introduce til::some (#4123) 2020-01-09 09:07:52 -08:00
RectangleTests.cpp Adjusts High DPI scaling to enable differential rendering (#5345) 2020-04-22 14:59:51 -07:00
ReplaceTests.cpp Add support for iterable, nested commands (#6856) 2020-08-13 21:22:46 +00:00
SizeTests.cpp Implement a pair of shims for cls, Clear-Host in conpty mode (#5627) 2020-04-30 21:53:31 +00:00
SomeTests.cpp til::bitmap (#4967) 2020-03-19 16:10:13 +00:00
sources Improve perf by avoiding vector reallocation in renderer clusters and VT output graphics options (#6420) 2020-06-10 22:02:05 +00:00
SPSCTests.cpp Correct comment in this SPSC test as a quick follow up to merge. 2020-07-16 13:53:56 -07:00
StaticMapTests.cpp Add til::static_map, a constexpr key-value store (#7323) 2020-08-18 18:05:14 +00:00
til.unit.tests.vcxproj Add til::static_map, a constexpr key-value store (#7323) 2020-08-18 18:05:14 +00:00
til.unit.tests.vcxproj.filters Add til::static_map, a constexpr key-value store (#7323) 2020-08-18 18:05:14 +00:00
u8u16convertTests.cpp ensure u8u16 handles lead & continuation bytes in separate txns (#4798) 2020-03-04 11:15:35 -08:00