[libcxx-commits] [PATCH] D109212: [libc++][NFCI] span: replace enable_if with requires

Joe Loser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Sep 3 07:38:49 PDT 2021


jloser added a comment.

In D109212#2981554 <https://reviews.llvm.org/D109212#2981554>, @Mordante wrote:

> Thanks for working on this! In general I prefer concepts over `enable_if`s. Unfortunately some of our supported compilers don't have proper concepts support yet. We could use `#if`s to guard against that, however IMO that would make the code unneeded ugly. Alternatively we wait until we only support compilers with concepts support.
>
> @ldionne Do you know when AppleClang 13 will be released and whether it has concepts support?
>
> (I want to discuss this before doing a review.)

Thanks for some context. I started poking around in `span` last night as I came across this recent libc++ bug <https://bugs.llvm.org/show_bug.cgi?id=51443>. It made me realize there are several missing constraints for `span`, which motivated a move to `requires` clauses first to make things not as verbose in fixing all of the constraints.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109212



More information about the libcxx-commits mailing list