public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/103013] New: Underconstrained constructor span(_Range&&)
@ 2021-10-31  9:48 andrey.davydov at jetbrains dot com
  2021-10-31  9:50 ` [Bug libstdc++/103013] " andrey.davydov at jetbrains dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: andrey.davydov at jetbrains dot com @ 2021-10-31  9:48 UTC (permalink / raw)
  To: gcc-bugs

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);

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-04-26 13:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-31  9:48 [Bug libstdc++/103013] New: Underconstrained constructor span(_Range&&) andrey.davydov at jetbrains dot com
2021-10-31  9:50 ` [Bug libstdc++/103013] " andrey.davydov at jetbrains dot com
2021-10-31 18:11 ` redi at gcc dot gnu.org
2021-10-31 18:13 ` redi at gcc dot gnu.org
2021-11-01  3:12 ` rs2740 at gmail dot com
2021-11-01  5:23 ` andrey.davydov at jetbrains dot com
2021-11-01 11:32 ` redi at gcc dot gnu.org
2021-11-01 23:51 ` cvs-commit at gcc dot gnu.org
2021-11-01 23:54 ` redi at gcc dot gnu.org
2022-04-21 12:33 ` cvs-commit at gcc dot gnu.org
2022-04-26 13:13 ` cvs-commit at gcc dot gnu.org
2022-04-26 13:21 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).