Re: [libstdc++] Add C++17clamp

2016-07-22 Thread Jonathan Wakely
On 22/07/16 17:12 -0400, NightStrike wrote: Would it be possible to fix the missed optimization to give the better asm without having to do -ffast-math as mentioned here: https://gcc.gnu.org/ml/gcc-help/2014-11/msg00034.html If so, then the proposed implementation would be optimized for the

Re: [libstdc++] Add C++17clamp

2016-07-22 Thread NightStrike
Would it be possible to fix the missed optimization to give the better asm without having to do -ffast-math as mentioned here: https://gcc.gnu.org/ml/gcc-help/2014-11/msg00034.html If so, then the proposed implementation would be optimized for the simple case. On Fri, Jul 22, 2016 at 3:55 AM,

Re: [libstdc++] Add C++17clamp

2016-07-22 Thread Jonathan Wakely
On 22/07/16 19:38 +0200, Daniel Krügler wrote: 2016-07-22 9:55 GMT+02:00 Jonathan Wakely : On 22/07/16 08:51 +0100, Jonathan Wakely wrote: On 21/07/16 19:38 -0400, NightStrike wrote: On Thu, Jul 14, 2016 at 7:50 PM, Ed Smith-Rowland <3dw...@verizon.net> wrote: Here is

Re: [libstdc++] Add C++17clamp

2016-07-22 Thread Daniel Krügler
2016-07-22 9:55 GMT+02:00 Jonathan Wakely : > On 22/07/16 08:51 +0100, Jonathan Wakely wrote: >> >> On 21/07/16 19:38 -0400, NightStrike wrote: >>> >>> On Thu, Jul 14, 2016 at 7:50 PM, Ed Smith-Rowland <3dw...@verizon.net> >>> wrote: Here is an implementation of P0025

Re: [libstdc++] Add C++17clamp

2016-07-22 Thread Jonathan Wakely
On 22/07/16 08:51 +0100, Jonathan Wakely wrote: On 21/07/16 19:38 -0400, NightStrike wrote: On Thu, Jul 14, 2016 at 7:50 PM, Ed Smith-Rowland <3dw...@verizon.net> wrote: Here is an implementation of P0025 An algorithm to "clamp" a value between a pair of boundary values. Testing is almost

Re: [libstdc++] Add C++17clamp

2016-07-22 Thread Jonathan Wakely
On 21/07/16 19:38 -0400, NightStrike wrote: On Thu, Jul 14, 2016 at 7:50 PM, Ed Smith-Rowland <3dw...@verizon.net> wrote: Here is an implementation of P0025 An algorithm to "clamp" a value between a pair of boundary values. Testing is almost finished - looks good so far. OK if testing passes?

Re: [libstdc++] Add C++17clamp

2016-07-21 Thread NightStrike
On Thu, Jul 14, 2016 at 7:50 PM, Ed Smith-Rowland <3dw...@verizon.net> wrote: > Here is an implementation of P0025 > An algorithm to "clamp" a value between a pair of boundary values. > > Testing is almost finished - looks good so far. > > OK if testing passes? > > I didn't see a feature test in

Re: [libstdc++] Add C++17clamp

2016-07-21 Thread Jonathan Wakely
On 15/07/16 13:34 -0400, Ed Smith-Rowland wrote: OK for trunk, thanks. I didn't see a feature test in any of the SD-6 papers or P0025. p0096r3 proposes __cpp_lib_clamp = 201603. I added the feature macro and committed the attached as 238383. Thanks, Ed 2016-07-15 Edward

Re: [libstdc++] Add C++17clamp

2016-07-15 Thread Ed Smith-Rowland
OK for trunk, thanks. I didn't see a feature test in any of the SD-6 papers or P0025. p0096r3 proposes __cpp_lib_clamp = 201603. I added the feature macro and committed the attached as 238383. Thanks, Ed 2016-07-15 Edward Smith-Rowland <3dw...@verizon.net> Implement C++17

Re: [libstdc++] Add C++17clamp

2016-07-15 Thread Jonathan Wakely
On 14/07/16 19:50 -0400, Ed Smith-Rowland wrote: Here is an implementation of P0025 An algorithm to "clamp" a value between a pair of boundary values. Testing is almost finished - looks good so far. OK if testing passes? OK for trunk, thanks. I didn't see a feature test in any of the SD-6

[libstdc++] Add C++17clamp

2016-07-14 Thread Ed Smith-Rowland
Here is an implementation of P0025 An algorithm to "clamp" a value between a pair of boundary values. Testing is almost finished - looks good so far. OK if testing passes? I didn't see a feature test in any of the SD-6 papers or P0025. 2016-07-15 Edward Smith-Rowland <3dw...@verizon.net>