From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2503E3858408; Sun, 31 Oct 2021 09:48:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2503E3858408 From: "andrey.davydov at jetbrains dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/103013] New: Underconstrained constructor span(_Range&&) Date: Sun, 31 Oct 2021 09:48:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 11.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: andrey.davydov at jetbrains dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Oct 2021 09:48:07 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103013 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 constru= ctor from `_Range &&` is checked and concept `contiguous_range>` instantiated. It requires T to be complete type (https://gcc.godbolt.org/z/fYWa3KdTs). It means that `optional>` 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 requires (!__is_same(_Range, span)) && ... span(_Range&& __range);=