public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101214] New: ranges::split_view::sentinel lacks default constructor
@ 2021-06-25 17:20 hewillk at gmail dot com
2021-06-25 17:26 ` [Bug libstdc++/101214] " hewillk at gmail dot com
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: hewillk at gmail dot com @ 2021-06-25 17:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101214
Bug ID: 101214
Summary: ranges::split_view::sentinel lacks default
constructor
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
#include <ranges>
int main() {
auto r = std::views::iota(0) | std::views::take(5);
decltype(std::views::split(r, 0).end()) e{};
}
https://godbolt.org/z/oK9zbE5WG
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/101214] ranges::split_view::sentinel lacks default constructor
2021-06-25 17:20 [Bug c++/101214] New: ranges::split_view::sentinel lacks default constructor hewillk at gmail dot com
@ 2021-06-25 17:26 ` hewillk at gmail dot com
2021-06-25 19:53 ` ppalka at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: hewillk at gmail dot com @ 2021-06-25 17:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101214
--- Comment #1 from 康桓瑋 <hewillk at gmail dot com> ---
(In reply to 康桓瑋 from comment #0)
> #include <ranges>
>
> int main() {
> auto r = std::views::iota(0) | std::views::take(5);
> decltype(std::views::split(r, 0).end()) e{};
> }
>
Another tiny issue is that in ranges#L3309:
constexpr
split_view(_Range&& __r, range_value_t<_Range> __e)
: _M_pattern(views::single(__e)),
_M_base(views::all(std::forward<_Range>(__r)))
{ }
it should be _M_pattern(views::single(std::move(__e))) just like
lazy_split_view.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/101214] ranges::split_view::sentinel lacks default constructor
2021-06-25 17:20 [Bug c++/101214] New: ranges::split_view::sentinel lacks default constructor hewillk at gmail dot com
2021-06-25 17:26 ` [Bug libstdc++/101214] " hewillk at gmail dot com
@ 2021-06-25 19:53 ` ppalka at gcc dot gnu.org
2021-06-28 5:34 ` hewillk at gmail dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-06-25 19:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101214
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
Ever confirmed|0 |1
Last reconfirmed| |2021-06-25
CC| |ppalka at gcc dot gnu.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/101214] ranges::split_view::sentinel lacks default constructor
2021-06-25 17:20 [Bug c++/101214] New: ranges::split_view::sentinel lacks default constructor hewillk at gmail dot com
2021-06-25 17:26 ` [Bug libstdc++/101214] " hewillk at gmail dot com
2021-06-25 19:53 ` ppalka at gcc dot gnu.org
@ 2021-06-28 5:34 ` hewillk at gmail dot com
2021-07-16 13:46 ` cvs-commit at gcc dot gnu.org
2021-07-16 13:48 ` ppalka at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: hewillk at gmail dot com @ 2021-06-28 5:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101214
--- Comment #2 from 康桓瑋 <hewillk at gmail dot com> ---
In ranges#L3367:
_Iterator() requires default_initializable<iterator_t<_Vp>> = default;
This constraint seems to be redundant because forward_iterator always satisfies
default_initializable.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/101214] ranges::split_view::sentinel lacks default constructor
2021-06-25 17:20 [Bug c++/101214] New: ranges::split_view::sentinel lacks default constructor hewillk at gmail dot com
` (2 preceding siblings ...)
2021-06-28 5:34 ` hewillk at gmail dot com
@ 2021-07-16 13:46 ` cvs-commit at gcc dot gnu.org
2021-07-16 13:48 ` ppalka at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-16 13:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101214
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:73464a472aa4e86359f1a5dc529394fe5152fec0
commit r12-2356-g73464a472aa4e86359f1a5dc529394fe5152fec0
Author: Patrick Palka <ppalka@redhat.com>
Date: Fri Jul 16 09:44:32 2021 -0400
libstdc++: Give split_view::_Sentinel a default ctor [PR101214]
This gives the new split_view's sentinel type a defaulted default
constructor, something which was overlooked in r12-1665. This patch
also fixes a couple of other issues with the new split_view as reported
in the PR.
PR libstdc++/101214
libstdc++-v3/ChangeLog:
* include/std/ranges (split_view::split_view): Use std::move.
(split_view::_Iterator::_Iterator): Remove redundant
default_initializable constraint.
(split_view::_Sentinel::_Sentinel): Declare.
* testsuite/std/ranges/adaptors/split.cc (test02): New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/101214] ranges::split_view::sentinel lacks default constructor
2021-06-25 17:20 [Bug c++/101214] New: ranges::split_view::sentinel lacks default constructor hewillk at gmail dot com
` (3 preceding siblings ...)
2021-07-16 13:46 ` cvs-commit at gcc dot gnu.org
@ 2021-07-16 13:48 ` ppalka at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-07-16 13:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101214
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Target Milestone|--- |12.0
Resolution|--- |FIXED
--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed for GCC 12.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-07-16 13:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-25 17:20 [Bug c++/101214] New: ranges::split_view::sentinel lacks default constructor hewillk at gmail dot com
2021-06-25 17:26 ` [Bug libstdc++/101214] " hewillk at gmail dot com
2021-06-25 19:53 ` ppalka at gcc dot gnu.org
2021-06-28 5:34 ` hewillk at gmail dot com
2021-07-16 13:46 ` cvs-commit at gcc dot gnu.org
2021-07-16 13:48 ` ppalka 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).