https://bugs.llvm.org/show_bug.cgi?id=51443
Bug ID: 51443
Summary: libc++ std::span implementation missing constructor
overload for iterator and sentinel
Product: libc++
Version: 12.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: eno...@alumni.cmu.edu
CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com
The constructor taking an iterator/sentinel seems to be missing from libc++'s
implementation of std::span.
Prototype:
template<class It, class End>
constexpr explicit(extent != dynamic_extent) span(It first, End last);
Standard link (section 22.7.3.2):
http://eel.is/c++draft/views#lib:span,constructor__
Example:
#include <span>
#include <string>
void foo() {
std::string str{};
std::span bar{str.begin(), str.end()};
}
The above code fails to compile on Clang 12.0.1 with -std=c++20 -stdlib=libc++,
but is accepted with -stdlib=libstdc++.
--
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