public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libstdc++: Apply proposed resolutions for LWG 3428, 3447
@ 2020-10-22 15:05 Patrick Palka
  2020-10-22 15:11 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick Palka @ 2020-10-22 15:05 UTC (permalink / raw)
  To: gcc-patches; +Cc: libstdc++, Patrick Palka

Tested on x86_64-pc-linux-gnu.  Does this look OK for trunk and the 10
branch?

libstdc++-v3/ChangeLog:

	* include/std/ranges (single_view::single_view): Mark the
	in place constructor explicit as per LWG 3428.
	(take_view): Remove the constraint on the deduction guide's
	template parameter as per LWG 3447.
---
 libstdc++-v3/include/std/ranges | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges
index 4d3a4940c6f..a3e5354848a 100644
--- a/libstdc++-v3/include/std/ranges
+++ b/libstdc++-v3/include/std/ranges
@@ -205,9 +205,11 @@ namespace ranges
       : _M_value(std::move(__t))
       { }
 
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 3428. single_view's in place constructor should be explicit
       template<typename... _Args>
 	requires constructible_from<_Tp, _Args...>
-	constexpr
+	constexpr explicit
 	single_view(in_place_t, _Args&&... __args)
 	: _M_value{in_place, std::forward<_Args>(__args)...}
 	{ }
@@ -1801,7 +1803,10 @@ namespace views
       }
     };
 
-  template<range _Range>
+  // _GLIBCXX_RESOLVE_LIB_DEFECTS
+  // 3447. Deduction guides for take_view and drop_view have different
+  // constraints
+  template<typename _Range>
     take_view(_Range&&, range_difference_t<_Range>)
       -> take_view<views::all_t<_Range>>;
 
-- 
2.29.0.rc0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] libstdc++: Apply proposed resolutions for LWG 3428, 3447
  2020-10-22 15:05 [PATCH] libstdc++: Apply proposed resolutions for LWG 3428, 3447 Patrick Palka
@ 2020-10-22 15:11 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2020-10-22 15:11 UTC (permalink / raw)
  To: Patrick Palka; +Cc: gcc-patches, libstdc++

On 22/10/20 11:05 -0400, Patrick Palka via Libstdc++ wrote:
>Tested on x86_64-pc-linux-gnu.  Does this look OK for trunk and the 10
>branch?

Yes for both, thanks.

>libstdc++-v3/ChangeLog:
>
>	* include/std/ranges (single_view::single_view): Mark the
>	in place constructor explicit as per LWG 3428.
>	(take_view): Remove the constraint on the deduction guide's
>	template parameter as per LWG 3447.
>---
> libstdc++-v3/include/std/ranges | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
>diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges
>index 4d3a4940c6f..a3e5354848a 100644
>--- a/libstdc++-v3/include/std/ranges
>+++ b/libstdc++-v3/include/std/ranges
>@@ -205,9 +205,11 @@ namespace ranges
>       : _M_value(std::move(__t))
>       { }
>
>+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
>+      // 3428. single_view's in place constructor should be explicit
>       template<typename... _Args>
> 	requires constructible_from<_Tp, _Args...>
>-	constexpr
>+	constexpr explicit
> 	single_view(in_place_t, _Args&&... __args)
> 	: _M_value{in_place, std::forward<_Args>(__args)...}
> 	{ }
>@@ -1801,7 +1803,10 @@ namespace views
>       }
>     };
>
>-  template<range _Range>
>+  // _GLIBCXX_RESOLVE_LIB_DEFECTS
>+  // 3447. Deduction guides for take_view and drop_view have different
>+  // constraints
>+  template<typename _Range>
>     take_view(_Range&&, range_difference_t<_Range>)
>       -> take_view<views::all_t<_Range>>;
>
>-- 
>2.29.0.rc0
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-22 15:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-22 15:05 [PATCH] libstdc++: Apply proposed resolutions for LWG 3428, 3447 Patrick Palka
2020-10-22 15:11 ` Jonathan Wakely

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).