~/talk

Arithmetic in C++ Using Counting Pointers

Talkat ACCU 2025 · 2025-04-01..04-04· [c-and-cpp]
links:none on file
slides:none on file

Claims a complete integer system built from stacked pointers in C++ type space that avoids built-in integers, runtime code, and `constexpr`. It implements increment/decrement via pointer add/remove, addition by shifting pointers across operands, multiplication with a recursive template accumulator helper, and exponentiation by repeated multiplication; tests use decltype-based checks and verify results up to small examples like 2+2=4 and 2^3=8. It is header-only and zero-cost for small N but intentionally overwhelms compilers for larger values as a stress test.

AI-written summary · about

  1. 0:00Introduction to Pointer Arithmetic
  2. 0:27Counting Pointers as Numbers
  3. 1:04Type-Safe Arithmetic Without Integers
  4. 1:33Implementing Increment and Decrement
  5. 2:00Addition in Type Space
  6. 2:43Multiplication with Templates
  7. 3:45Exponentiation with Recursive Templates
  8. 4:46Why Use Compile-Time Arithmetic?
  9. 5:03Final Thoughts and Compiler Stress Testing
~/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.