[libcxx-commits] [PATCH] D88864: Add assert in `constexpr string_view::operator[]`

Jan Wilken Dörrie via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 12 00:56:20 PDT 2020


jdoerrie added a comment.

Late LGTM.

In D88864#2313700 <https://reviews.llvm.org/D88864#2313700>, @miscco wrote:

> I wanted to cry at the use of a comma operator, but all the other member functions do the same...

We discussed this over in https://reviews.llvm.org/D70343. IIUC this is required because libc++'s `string_view` is available in all dialects, and C++11 only allows you to have a single return statement in a `constexpr` function.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88864



More information about the libcxx-commits mailing list