[libcxx-commits] [PATCH] D95251: Remove noexcept from basic_string::find and implementation functions.

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 22 11:54:22 PST 2021


zoecarver added a comment.

In D95251#2516236 <https://reviews.llvm.org/D95251#2516236>, @CaseyCarter wrote:

> In D95251#2516190 <https://reviews.llvm.org/D95251#2516190>, @mclow.lists wrote:
>
>> - Yes, file an LWG issue.
>
> In your issue, be sure to ask for clarification of [char.traits.require]/1's "In Table 71, X denotes a traits class defining types and functions for the character container type C ... Operations on X shall not throw exceptions.". I've always interpreted this to mean that the operations in the table shall not throw, but I'd have a hard time arguing that's the intended meaning of "operations on X".

Hmm interesting. I didn't even think to look at the char traits. I suppose that paragraph could be more clear, but what, other than "calling static members," could "operations on X" be referring to (especially in the context of throwing exceptions)?

In the issue, I'll ask for clarification and propose either that all these find-like members are marked noexcept or none of them are. The thing that's really making me uneasy is that two of them are and the rest aren't.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95251/new/

https://reviews.llvm.org/D95251



More information about the libcxx-commits mailing list