Re: Help with g++ 6 abs() and templates

2016-02-20 Thread Zbigniew Jędrzejewski-Szmek
On Sat, Feb 20, 2016 at 10:35:06AM +, Jonathan Wakely wrote: > On 20/02/16 03:32 +, Jonathan Wakely wrote: > >On 19/02/16 20:18 -0700, Orion Poplawski wrote: > >>octave has template functions that call abs() on templated > >>variables, something like: > >> > >>template > >>T myfunc(T arg)

Re: Help with g++ 6 abs() and templates

2016-02-20 Thread Jonathan Wakely
On 20/02/16 03:32 +, Jonathan Wakely wrote: On 19/02/16 20:18 -0700, Orion Poplawski wrote: octave has template functions that call abs() on templated variables, something like: template T myfunc(T arg) { T x = abs(arg); } This leads to errors when instantiated for unsigned types becaus

Re: Help with g++ 6 abs() and templates

2016-02-19 Thread Jonathan Wakely
On 19/02/16 20:18 -0700, Orion Poplawski wrote: octave has template functions that call abs() on templated variables, something like: template T myfunc(T arg) { T x = abs(arg); } This leads to errors when instantiated for unsigned types because abs(unsigned type) is not defined as is doesn'

Help with g++ 6 abs() and templates

2016-02-19 Thread Orion Poplawski
octave has template functions that call abs() on templated variables, something like: template T myfunc(T arg) { T x = abs(arg); } This leads to errors when instantiated for unsigned types because abs(unsigned type) is not defined as is doesn't make sense to do. That's fine and all, but how