public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Tamar Christina <tnfchris@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/ARM/heads/arm-struct-reorg-wip)] libstdc++: Add default-initializers to views (LWG 3364) Date: Fri, 17 Jul 2020 13:02:05 +0000 (GMT) [thread overview] Message-ID: <20200717130205.1F1D739874A7@sourceware.org> (raw) https://gcc.gnu.org/g:7433536b3d864c0d8d5180348690e1c280a3eaf2 commit 7433536b3d864c0d8d5180348690e1c280a3eaf2 Author: Jonathan Wakely <jwakely@redhat.com> Date: Wed Feb 19 22:00:14 2020 +0000 libstdc++: Add default-initializers to views (LWG 3364) * include/std/ranges (take_while_view, drop_view, drop_while_view) (elements_view:_Iterator): Initialize data members (LWG 3364). Diff: --- libstdc++-v3/ChangeLog | 3 +++ libstdc++-v3/include/std/ranges | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 622c2948eab..ef91b80ef45 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,8 @@ 2020-02-19 Jonathan Wakely <jwakely@redhat.com> + * include/std/ranges (take_while_view, drop_view, drop_while_view) + (elements_view:_Iterator): Initialize data members (LWG 3364). + * libsupc++/compare (three_way_comparable): Remove always-false check that should have been removed with weak_equality (P1959R0). (three_way_comparable_with): Likewise. Reorder requirements (LWG 3360). diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges index b348ba2cfcb..7a66491f2e4 100644 --- a/libstdc++-v3/include/std/ranges +++ b/libstdc++-v3/include/std/ranges @@ -2008,7 +2008,7 @@ namespace views { return __y._M_end == __x || !std::__invoke(*__y._M_pred, *__x); } }; - _Vp _M_base; + _Vp _M_base = _Vp(); __detail::__box<_Pred> _M_pred; public: @@ -2068,8 +2068,8 @@ namespace views class drop_view : public view_interface<drop_view<_Vp>> { private: - _Vp _M_base; - range_difference_t<_Vp> _M_count; + _Vp _M_base = _Vp(); + range_difference_t<_Vp> _M_count = 0; public: drop_view() = default; @@ -2147,7 +2147,7 @@ namespace views class drop_while_view : public view_interface<drop_while_view<_Vp, _Pred>> { private: - _Vp _M_base; + _Vp _M_base = _Vp(); __detail::__box<_Pred> _M_pred; public: @@ -3179,7 +3179,7 @@ namespace views { using _Base = conditional_t<_Const, const _Vp, _Vp>; - iterator_t<_Base> _M_current; + iterator_t<_Base> _M_current = iterator_t<_Base>(); friend _Iterator<!_Const>;
reply other threads:[~2020-07-17 13:02 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200717130205.1F1D739874A7@sourceware.org \ --to=tnfchris@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@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).