[llvm-bugs] [Bug 49295] New: Ambiguous constructor call error when calling std::span<T>(T*, 0)
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Feb 19 22:31:58 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=49295
Bug ID: 49295
Summary: Ambiguous constructor call error when calling
std::span<T>(T*, 0)
Product: libc++
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: schottm at google.com
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
[1] shows libstdc++ compiles just fine here.
There are a lot of reasons libc++'s std::span isn't in accord with
[views.span], most stemming from the lack of concepts and ranges support
elsewhere, but [span.cons] ¶ 7.4 explicitly mandates that
"is_convertible_v<End, size_t> is false" but the ambiguous constructors [2]
actually have no constraints at all (same with the ones above that on the
primary template).
And while you're at it, [span.cons] ¶ 3.2 and 7.1 ("is_convertible_v<U(*)[],
element_type(*)[]> is true") should be there too and that doesn't require your
concepts support to be there.
[1]: https://godbolt.org/z/7E14Pa
[2]: https://github.com/llvm/llvm-project/blob/main/libcxx/include/span#L386
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210220/ede72d7b/attachment-0001.html>
More information about the llvm-bugs
mailing list