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: unassignedclangb...@nondot.org
          Reporter: scho...@google.com
                CC: llvm-bugs@lists.llvm.org, mclow.li...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to