octave has template functions that call abs() on templated variables,
something like:
template <class T>
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 then does one write generic template code
as above that works for signed and unsigned types.
--
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA/CoRA Division FAX: 303-415-9702
3380 Mitchell Lane orion@xxxxxxxxxxxxx
Boulder, CO 80301 http://www.cora.nwra.com
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
http://lists.fedoraproject.org/admin/lists/devel@xxxxxxxxxxxxxxxxxxxxxxx