Skip to content
Commit 61363445 authored by David Benjamin's avatar David Benjamin Committed by Mark de Wever
Browse files

[libc++] Assert that lengths fit in difference_type

This can help flag accidentally passing in negative values into the  `string_view` constructor. This aligns with a similar check in `absl::string_view`.

Fixes https://github.com/llvm/llvm-project/issues/61100

Reviewed By: #libc, Mordante

Differential Revision: https://reviews.llvm.org/D145981
parent e657eb62
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment