P4030R0 — Endian Views
Eddie Nolan
LEWGSG9SG16
Revisions R1Jul 2026R0Feb 2026
The main reason for adding these views is to assist users of the UTF transcoding range adaptors (see [[P2728R7]](https://wg21.link/p2728r7)). That paper introduces the adaptors `to_utf8`, `to_utf16`, and `to_utf32`, which take as input ranges of `char8_t`, `char16_t`, and `char32_t`. The input and output of these views use native endianness. But users often need to convert to and from UTF encodings with specific endianness: UTF-16LE, UTF-16BE, UTF-32LE, and UTF-32BE.