[libcxx-commits] [libcxx] [libc++][hardening] Categorize more assertions. (PR #75918)

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Fri Dec 22 12:11:23 PST 2023


================
@@ -122,6 +122,8 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __encode(_OutIt&, char32_t) = delete;
 template <class _OutIt>
   requires __utf16_code_unit<iter_value_t<_OutIt>>
 _LIBCPP_HIDE_FROM_ABI constexpr void __encode(_OutIt& __out_it, char32_t __value) {
+  // From the Standard: "if `out` contains invalid code units, the behavior is undefined and implementations are
----------------
mordante wrote:

I prefer to have a reference to the Standard's stable name and paragraph so people can look it up again.

Due to the impact of these asserts I would suggest to make this a pedantic assert.

https://github.com/llvm/llvm-project/pull/75918


More information about the libcxx-commits mailing list