[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-bugs
Subject: [Bug libstdc++/103013] New: Underconstrained constructor span(_Range&&)
From: "andrey.davydov at jetbrains dot com via Gcc-bugs" <gcc-bugs () gcc ! gnu ! org>
Date: 2021-10-31 9:48:06
Message-ID: bug-103013-4 () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103013
Bug ID: 103013
Summary: Underconstrained constructor span(_Range&&)
Product: gcc
Version: 11.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: andrey.davydov at jetbrains dot com
Target Milestone: ---
During calculation of type trait `is_move_constructible<span>` span constructor
from `_Range &&` is checked and concept `contiguous_range<span<T>>`
instantiated. It requires T to be complete type
(https://gcc.godbolt.org/z/fYWa3KdTs). It means that
`optional<span<Incomplete>>` couldn't be instantiated
(https://gcc.godbolt.org/z/1PWdE4YK3).
This issue could be solved if make the constructor span(_Range&&) more
constrained, something like this:
template<typename _Range>
requires (!__is_same(_Range, span)) && ...
span(_Range&& __range);=
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic