public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc/devel/ranger] libstdc++: Remove converting constructors from views (LWG 3280) Date: Wed, 17 Jun 2020 19:01:10 +0000 (GMT) [thread overview] Message-ID: <20200617190110.5B3783948A6C@sourceware.org> (raw) https://gcc.gnu.org/g:4cc3b275d310dbf5982544cb88c11630349f414c commit 4cc3b275d310dbf5982544cb88c11630349f414c Author: Jonathan Wakely <jwakely@redhat.com> Date: Wed Feb 19 12:26:19 2020 +0000 libstdc++: Remove converting constructors from views (LWG 3280) * include/std/ranges (filter_view, transform_view, take_view) (join_view, split_view, reverse_view): Remove commented-out converting constructors (LWG 3280). Diff: --- libstdc++-v3/ChangeLog | 4 +++ libstdc++-v3/include/std/ranges | 68 +++-------------------------------------- 2 files changed, 8 insertions(+), 64 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 5408a89c7fb..9ccba4345d5 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,9 @@ 2020-02-19 Jonathan Wakely <jwakely@redhat.com> + * include/std/ranges (filter_view, transform_view, take_view) + (join_view, split_view, reverse_view): Remove commented-out converting + constructors (LWG 3280). + * include/std/memory (uninitialized_construct_using_allocator): Use std::construct_at (LWG 3321). diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges index 4bfda88c319..cf4c19ffaab 100644 --- a/libstdc++-v3/include/std/ranges +++ b/libstdc++-v3/include/std/ranges @@ -1470,17 +1470,6 @@ namespace views : _M_base(std::move(__base)), _M_pred(std::move(__pred)) { } - /* XXX: P3280 removes this constructor - template<input_range _Range> - requires viewable_range<_Range> - && constructible_from<_Vp, all_view<_Range>> - constexpr - filter_view(_Range&& __r, _Pred __pred) - : _M_base(views::all(std::forward<_Range>(__r))), - _M_pred(std::move(__pred)) - { } - */ - constexpr _Vp base() const& requires copy_constructible<_Vp> { return _M_base; } @@ -1799,17 +1788,6 @@ namespace views : _M_base(std::move(__base)), _M_fun(std::move(__fun)) { } - /* XXX: P3280 removes this constructor - template<input_range _Range> - requires viewable_range<_Range> - && constructible_from<_Vp, all_view<_Range>> - constexpr - transform_view(_Range&& __r, _Fp __fun) - : _M_base(views::all(std::forward<_Range>(__r))) - { - } - */ - constexpr _Vp base() const& requires copy_constructible<_Vp> { return _M_base ; } @@ -1915,15 +1893,6 @@ namespace views : _M_base(std::move(base)), _M_count(std::move(__count)) { } - /* XXX: P3280 removes this constructor - template<viewable_range _Range> - requires constructible_from<_Vp, all_view<_Range>> - constexpr - take_view(_Range&& __r, range_difference_t<_Vp> __count) - : _M_base(views::all(std::forward<_Range>(__r))), _M_count(__count) - { } - */ - constexpr _Vp base() const& requires copy_constructible<_Vp> { return _M_base; } @@ -2491,16 +2460,6 @@ namespace views : _M_base(std::move(__base)) { } - /* XXX: P3280 removes this constructor - template<input_range _Range> - requires viewable_range<_Range> - && constructible_from<_Vp, all_view<_Range>> - constexpr explicit - join_view(_Range&& __r) - : _M_base(views::all(std::forward<_Range>(__r))) - { } - */ - constexpr _Vp base() const& requires copy_constructible<_Vp> { return _M_base; } @@ -2878,17 +2837,6 @@ namespace views : _M_base(std::move(__base)), _M_pattern(std::move(__pattern)) { } - /* XXX: P3280 removes this constructor - template<input_range _Range, forward_range _Pred> - requires constructible_from<_Vp, all_view<_Range>> - && constructible_from<_Pattern, all_view<_Pred>> - constexpr - split_view(_Range&& __r, _Pred&& __p) - : _M_base(views::all(std::forward<_Range>(__r))), - _M_pattern(views::all(std::forward<_Pred>(__p))) - { } - */ - template<input_range _Range> requires constructible_from<_Vp, all_view<_Range>> && constructible_from<_Pattern, single_view<range_value_t<_Range>>> @@ -2994,14 +2942,15 @@ namespace views : _M_base(std::move(__r)) { } - /* XXX: P3280 doesn't remove this constructor, but I think it should? + /* XXX: LWG 3280 didn't remove this constructor, but I think it should? template<viewable_range _Range> - requires (!common_range<_Range>) && constructible_from<_Vp, all_view<_Range>> + requires (!common_range<_Range>) + && constructible_from<_Vp, all_view<_Range>> constexpr explicit common_view(_Range&& __r) : _M_base(views::all(std::forward<_Range>(__r))) { } - */ + */ constexpr _Vp base() const& requires copy_constructible<_Vp> @@ -3092,15 +3041,6 @@ namespace views : _M_base(std::move(__r)) { } - /* XXX: P3280 removes this constructor - template<viewable_range _Range> - requires bidirectional_range<_Range> && constructible_from<_Vp, all_view<_Range>> - constexpr explicit - reverse_view(_Range&& __r) - : _M_base(views::all(std::forward<_Range>(__r))) - { } - */ - constexpr _Vp base() const& requires copy_constructible<_Vp> { return _M_base; }
reply other threads:[~2020-06-17 19:01 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=20200617190110.5B3783948A6C@sourceware.org \ --to=aldyh@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).