From: Jonathan Wakely Date: Wed, 19 Feb 2020 12:26:19 +0000 (+0000) Subject: libstdc++: Remove converting constructors from views (LWG 3280) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4cc3b275d310dbf5982544cb88c11630349f414c;p=gcc.git 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 --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 + * 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 - 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 - 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 - 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 - 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 - 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 requires constructible_from<_Vp, all_view<_Range>> && constructible_from<_Pattern, single_view>> @@ -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 - 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 - 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; }