Re: [PATCH] libstdc++: add initializer_list constructor to std::span (P2447)

2024-12-11 Thread Jonathan Wakely
t; > >From bb1d537ee7b68883403127903834427c6787c505 Mon Sep 17 00:00:00 2001 > >From: Giuseppe D'Angelo > >Date: Tue, 3 Dec 2024 16:56:45 +0100 > >Subject: [PATCH] libstdc++: add initializer_list constructor to std::span > > (P2447) > > > >This commit imp

Re: [PATCH] libstdc++: add initializer_list constructor to std::span (P2447)

2024-12-11 Thread Jonathan Wakely
or the new constructor. Thanks, -- Giuseppe D'Angelo From bb1d537ee7b68883403127903834427c6787c505 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Tue, 3 Dec 2024 16:56:45 +0100 Subject: [PATCH] libstdc++: add initializer_list constructor to std::span (P2447) This commit implemen

Re: [PATCH] libstdc++: add initializer_list constructor to std::span (P2447)

2024-12-11 Thread Jonathan Wakely
On Wed, 11 Dec 2024 at 21:18, Giuseppe D'Angelo wrote: > > On 11/12/2024 21:41, Jonathan Wakely wrote: > > Hmm, the warning is useful if somebody does: > > > > std::span s({1,2,3}); > > > > So I think we do want the warning, but maybe give it a special case so > > it doesn't warn for an rvalue std

Re: [PATCH] libstdc++: add initializer_list constructor to std::span (P2447)

2024-12-11 Thread Giuseppe D'Angelo
On 11/12/2024 21:41, Jonathan Wakely wrote: Hmm, the warning is useful if somebody does: std::span s({1,2,3}); So I think we do want the warning, but maybe give it a special case so it doesn't warn for an rvalue std::span. Do you have anything in mind to make this work? Note that the above i

Re: [PATCH] libstdc++: add initializer_list constructor to std::span (P2447)

2024-12-11 Thread Jonathan Wakely
On Tue, 3 Dec 2024 at 16:07, Giuseppe D'Angelo wrote: > > Hello, > > The attached patch adds the span(initializer_list) constructor, added by > P2447R6 for C++26. > > It seems that GCC is somewhat aggressive with its -Winit-list-lifetime > warning, which actively interferes with this feature. The

[PATCH] libstdc++: add initializer_list constructor to std::span (P2447)

2024-12-03 Thread Giuseppe D'Angelo
ngelo From bb1d537ee7b68883403127903834427c6787c505 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Tue, 3 Dec 2024 16:56:45 +0100 Subject: [PATCH] libstdc++: add initializer_list constructor to std::span (P2447) This commit implements P2447R6. The code is straightforward (just one ex