[libcxx-commits] [PATCH] D71994: SFINAE span default constructor on Extent == 0

Michael Schellenberger Costa via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 3 00:17:15 PST 2020


miscco added a comment.

Hm, this fixes a todo that was written by you..

No seriously I believe this is indeed a correctness issue.

First the standard marks this as a "Constraint" <https://eel.is/c++draft/span.cons#1>. As far as my standardese goes this requires that this function should be SFINAEd out.

Also if we would not remove the default constructor `span<T, 2>` would fulfill the`default_constructible` concept although it does not.

So I believe there is no alternative to removing that constructor.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71994





More information about the libcxx-commits mailing list