Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-08-07 Thread Ed Smith-Rowland via gcc-patches
On 8/6/19 11:30 AM, Steve Ellcey wrote: Ed, I have run into an ICE that I tracked down to this patch: commit 02fefffe6b78c4c39169206aa40fb53f367ecba8 Author: emsr Date: Thu Aug 1 15:25:42 2019 + 2019-08-01 Edward Smith-Rowland <3dw...@verizon.net> Implement C++20 p0

Re: [EXT] Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-08-06 Thread Steve Ellcey
On Tue, 2019-08-06 at 16:47 -0400, Marek Polacek wrote: > On Tue, Aug 06, 2019 at 08:30:14PM +, Steve Ellcey wrote: > > On Tue, 2019-08-06 at 21:04 +0100, Jonathan Wakely wrote: > > > > > > The RAJAPerf code appears to be built with -std=gnu++11 which > > > means > > > Ed's patch should make a

Re: [EXT] Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-08-06 Thread Marek Polacek
On Tue, Aug 06, 2019 at 08:30:14PM +, Steve Ellcey wrote: > On Tue, 2019-08-06 at 21:04 +0100, Jonathan Wakely wrote: > > > > The RAJAPerf code appears to be built with -std=gnu++11 which means > > Ed's patch should make almost no difference at all. 99% of the patch > > has no effect unless co

Re: [EXT] Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-08-06 Thread Steve Ellcey
On Tue, 2019-08-06 at 21:04 +0100, Jonathan Wakely wrote: > > The RAJAPerf code appears to be built with -std=gnu++11 which means > Ed's patch should make almost no difference at all. 99% of the patch > has no effect unless compiling with -std=gnu++2a. > > I don't see any ICE running the libstdc+

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-08-06 Thread Jonathan Wakely
On 06/08/19 15:30 +, Steve Ellcey wrote: Ed, I have run into an ICE that I tracked down to this patch: commit 02fefffe6b78c4c39169206aa40fb53f367ecba8 Author: emsr Date: Thu Aug 1 15:25:42 2019 + 2019-08-01 Edward Smith-Rowland <3dw...@verizon.net> Implement C++20 p

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-08-06 Thread Steve Ellcey
Ed, I have run into an ICE that I tracked down to this patch: commit 02fefffe6b78c4c39169206aa40fb53f367ecba8 Author: emsr Date: Thu Aug 1 15:25:42 2019 + 2019-08-01 Edward Smith-Rowland <3dw...@verizon.net> Implement C++20 p0202 - Add Constexpr Modifiers to Functions

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-08-01 Thread Ed Smith-Rowland via gcc-patches
On 8/1/19 3:45 PM, Jonathan Wakely wrote: On 01/08/19 11:47 -0400, Ed Smith-Rowland via libstdc++ wrote: On 8/1/19 6:56 AM, Jonathan Wakely wrote: On 31/07/19 10:50 -0400, Ed Smith-Rowland via libstdc++ wrote: Here is the patch for * Implement C++20 p0202 - Add constexpr Modifiers to Function

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-08-01 Thread Jonathan Wakely
On 01/08/19 11:47 -0400, Ed Smith-Rowland via libstdc++ wrote: On 8/1/19 6:56 AM, Jonathan Wakely wrote: On 31/07/19 10:50 -0400, Ed Smith-Rowland via libstdc++ wrote: Here is the patch for * Implement C++20 p0202 - Add constexpr Modifiers to Functions in and Headers. * Implement C++20 p1

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-08-01 Thread Ed Smith-Rowland via gcc-patches
On 8/1/19 6:56 AM, Jonathan Wakely wrote: On 31/07/19 10:50 -0400, Ed Smith-Rowland via libstdc++ wrote: Here is the patch for * Implement C++20 p0202 - Add constexpr Modifiers to Functions in and Headers. * Implement C++20 p1023 - constexpr comparison operators for std::array. Relative t

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-08-01 Thread Jonathan Wakely
On 31/07/19 10:50 -0400, Ed Smith-Rowland via libstdc++ wrote: Here is the patch for * Implement C++20 p0202 - Add constexpr Modifiers to Functions in and Headers. * Implement C++20 p1023 - constexpr comparison operators for std::array. Relative to the last effort it is rebased on more rec

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-07-31 Thread Ed Smith-Rowland via gcc-patches
Here is the patch for * Implement C++20 p0202 - Add constexpr Modifiers to Functions in and Headers. * Implement C++20 p1023 - constexpr comparison operators for std::array. Relative to the last effort it is rebased on more recent trunk and I added to . There's some chance that I'll have

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-07-11 Thread Ed Smith-Rowland via gcc-patches
On 7/6/19 3:55 AM, Ville Voutilainen wrote: Blargh! But that's fine; the result of copy is not stored in a constexpr variable, but the function return is static_asserted so we have sufficiently tested that std::copy is indeed constexpr-compatible since it appears in a function that is evaluated

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-07-06 Thread Ville Voutilainen
On Sat, 6 Jul 2019 at 06:12, Ed Smith-Rowland via libstdc++ wrote: > By my reckoning, you have a constexpr source array, an output array that > is initialized as it must be for constexpr.?? You have to have a > deterministic result after the copy.?? In the local array version the > actual iterator

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-07-05 Thread Ed Smith-Rowland via gcc-patches
On 7/2/19 8:11 AM, Jonathan Wakely wrote: One more comment. In this: +#if __cplusplus > 201703L \ +?? && defined(_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED) +?? if (__builtin_is_constant_evaluated()) can be simplified to just: #ifdef __cpp_lib_is_constant_evaluated if (s

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-07-02 Thread Jonathan Wakely
On 26/06/19 19:13 -0400, Ed Smith-Rowland via libstdc++ wrote: Here is the first of three patches for C++20 constexpr library. ?? Implement C++20 p0202 - Add constexpr Modifiers to Functions in and Headers. ??Implement C++20 p1023 - constexpr comparison operators for std::array. I

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-06-27 Thread Jonathan Wakely
On 27/06/19 19:07 -0400, Ed Smith-Rowland wrote: On 6/27/19 1:06 PM, Ville Voutilainen wrote: On Thu, 27 Jun 2019 at 19:55, Ed Smith-Rowland via libstdc++ wrote: I don't think this will work in a constant expression: ?? /// Assign @p __new_val to @p __obj and return its previous value. ?? tem

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-06-27 Thread Ed Smith-Rowland via gcc-patches
On 6/27/19 1:06 PM, Ville Voutilainen wrote: On Thu, 27 Jun 2019 at 19:55, Ed Smith-Rowland via libstdc++ wrote: I don't think this will work in a constant expression: ?? /// Assign @p __new_val to @p __obj and return its previous value. ?? template +?? _GLIBCXX20_CONSTEXPR ?? inline

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-06-27 Thread Ville Voutilainen
On Thu, 27 Jun 2019 at 19:55, Ed Smith-Rowland via libstdc++ wrote: > > I don't think this will work in a constant expression: > > > > ?? /// Assign @p __new_val to @p __obj and return its previous value. > > ?? template > > +?? _GLIBCXX20_CONSTEXPR > > ?? inline _Tp > > ?? exchange(_

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-06-27 Thread Ed Smith-Rowland via gcc-patches
On 6/27/19 11:41 AM, Jonathan Wakely wrote: On 26/06/19 19:13 -0400, Ed Smith-Rowland via libstdc++ wrote: Here is the first of three patches for C++20 constexpr library. ?? Implement C++20 p0202 - Add constexpr Modifiers to Functions in and Headers. ??Implement C++20 p1023 - conste

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-06-27 Thread Jonathan Wakely
On 26/06/19 19:13 -0400, Ed Smith-Rowland via libstdc++ wrote: Here is the first of three patches for C++20 constexpr library. ?? Implement C++20 p0202 - Add constexpr Modifiers to Functions in and Headers. ??Implement C++20 p1023 - constexpr comparison operators for std::array. I

[PATCH 1/3] C++20 constexpr lib part 1/3

2019-06-26 Thread Ed Smith-Rowland via gcc-patches
Here is the first of three patches for C++20 constexpr library. ?? Implement C++20 p0202 - Add constexpr Modifiers to Functions in and Headers. ??Implement C++20 p1023 - constexpr comparison operators for std::array. I believe I have answered peoples concerns with the last patch att