public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "yronglin777 at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/109024] New: [C++23][ranges][repeat_view] The default ctor unuseable Date: Sat, 04 Mar 2023 16:03:30 +0000 [thread overview] Message-ID: <bug-109024-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109024 Bug ID: 109024 Summary: [C++23][ranges][repeat_view] The default ctor unuseable Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: yronglin777 at gmail dot com Target Milestone: --- The default ctor of std::ranges::repeat_view<int> was unuseable. https://godbolt.org/z/jxKMxEn7E [P2474R2] https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2474r2.html ``` repeat_view() requires default_initializable<W> = default; ``` ``` #include <ranges> #include <cassert> void fn() { std::ranges::repeat_view<int> v; } ``` ``` In file included from <source>:1: /opt/compiler-explorer/gcc-trunk-20230304/include/c++/13.0.1/ranges: In instantiation of 'constexpr std::ranges::repeat_view<_Tp, _Bound>::repeat_view() requires default_initializable<_Tp> [with _Tp = int; _Bound = std::unreachable_sentinel_t]': <source>:5:35: required from here /opt/compiler-explorer/gcc-trunk-20230304/include/c++/13.0.1/ranges:7395:37: error: could not convert '0' from 'int' to 'std::ranges::__detail::__box<int>' 7395 | __detail::__box<_Tp> _M_value = _Tp(); | ^~~~~ | | | int Compiler returned: 1 ```
next reply other threads:[~2023-03-04 16:03 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-04 16:03 yronglin777 at gmail dot com [this message] 2023-03-06 1:05 ` [Bug libstdc++/109024] " de34 at live dot cn 2023-03-06 16:42 ` redi at gcc dot gnu.org 2023-03-08 15:55 ` ppalka at gcc dot gnu.org 2023-03-09 18:37 ` cvs-commit at gcc dot gnu.org 2023-03-09 18:38 ` ppalka at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-109024-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).