Paper HistoryP3643

std::to_signed and std::to_unsigned

R32026-09

Paperweight: Heavy

The paper gives concrete evidence that similar utilities are widely used in real codebases and that a prior, closely related standardization effort succeeded with far less demonstrated demand. Its weakest moments come when it asserts rather than argues that the standard library is the right home for these functions and that a non-standard library solution would be insufficient.

  • The strongest support is the reported use of to_unsigned/to_signed or equivalent casts in roughly 115K C++ files, which grounds the proposal in observable practice.
  • The comparison to std::to_underlying offers useful precedent, including the fact that it was standardized on the basis of much thinner evidence of use.
  • The paper does not address implementation experience or coordination and interoperability with existing practice.
  • The case for placing the functions in the standard rather than a library is merely asserted, with no discussion of why a portable library wrapper would not meet the stated need.