Slides for P3666R3
Bit-precise integers
- Document number:
- P4157R0
- Date:
2026-03-26 - Audience:
- LEWG
- Project:
- ISO/IEC 14882 Programming Languages — C++, ISO/IEC JTC1/SC22/WG21
- Reply-To:
- Jan Schultke <janschultke@gmail.com>
- Source:
- github.com/Eisenwave/cpp-proposals/blob/master/src/bitint-lewg-slides.cow
- →, ↓ : go to the next slide
- ←, ↑ : go to previous slide
Bit-precise integers
P3666R3
Introduction
C23 now has type for N-bit integers (WG14 N2763, N2775):
- implemented by GCC and Clang; max:
_BitInt ( 8 ' 388 ' 608 ) - forwarded by EWG to LEWG/CWG for C++29
P3666 Library decisions to be made
- How much library support to provide?
- Aggressively minimal: just the core feature
- Minimal but useful: P3666R3
- More extensive:
,<simd> , etc.<atomic>
- Add
andstd :: bit_int alias templates?std :: bit_uint - Is
true?std :: is_integral_v < _BitInt ( N ) >
Anecdote: std :: cmp_less
Alias templates
- deduction is supported
- library spec should prefer alias templates over keyword spelling
std :: is_integral_v < _BitInt ( N ) >
integral types ├── signed or unsigned integer types │ ├── standard integers:,int , etc. │ ├── extended integers:unsigned etc. │ └── bit-precise integers: (__int128 )unsigned ├── character types:_BitInt ( N ) ,char , etc. └──wchar_t bool
- mostly matches C2y taxonomy
- very surprising if
wasstd :: is_integral_v < _BitInt ( N ) > false - huge wording/teaching effort to treat
specially_BitInt ( N )