~/lightning

Lightning Talk: C++ String Literals Have the Wrong Type

Lightningat C++ on Sea 2023 · 2023-06-28..06-30· [c-and-cpp]
links:none on file
slides:none on file

String literals decay to arrays so std::ranges::size("abc") == 4 because the null terminator counts. The fix uses UDLs, NTTPs and TMP: a user defined literal returns a small compile time range type that stores pointer+length, implicitly converts to a C string, supports compile time concatenation without allocating memory, and produces correct begin/end where size is 3. It also supports different character types for UTF conversions and avoids instantiating storage until actually used.

AI-written summary · about

~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.