Slides in response to P3655R2
Concerns regarding std::zstring_view

Document number:
P3749R0
Date:
2025-06-27
Audience:
EWG
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/zstring-view-slides.cow

This document has custom controls:

  • ,  ↓ : go to the next slide
  • ,  ↑ : go to previous slide

Concerns regarding std::zstring_view
P3655R2

Jan Schultke  |  Slides in response to P3655R2 — Concerns regarding std::zstring_view  |  LEWG at Sofia 2025  |  Slide 1

Some obvious problems

Jan Schultke  |  Slides in response to P3655R2 — Concerns regarding std::zstring_view  |  LEWG at Sofia 2025  |  Slide 2

P3655R2 lacks discussion of performance

Jan Schultke  |  Slides in response to P3655R2 — Concerns regarding std::zstring_view  |  LEWG at Sofia 2025  |  Slide 3

std::zstring_view is a viral annotation

Preserving null terminators is not easy:

void c_api_wrapper(std::zstring_view s); const zstring_view config_source = /* ... */; map<string_view, string_view> config = json::parse(config_source); c_api_wrapper(config.at("file")); // error
Jan Schultke  |  Slides in response to P3655R2 — Concerns regarding std::zstring_view  |  LEWG at Sofia 2025  |  Slide 4

Suggestions to increase consensus

Jan Schultke  |  Slides in response to P3655R2 — Concerns regarding std::zstring_view  |  LEWG at Sofia 2025  |  Slide 5