[llvm-bugs] [Bug 51443] New: libc++ std::span implementation missing constructor overload for iterator and sentinel
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Aug 11 09:46:06 PDT 2021
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: unassignedclangbugs at nondot.org
Reporter: enolan at alumni.cmu.edu
CC: llvm-bugs at lists.llvm.org, mclow.lists at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210811/c23c01d2/attachment.html>
More information about the llvm-bugs
mailing list