I never noticed it won't take values assigned to variables and it doesn't like Strings or strings, but everything else works. However I reverted it back to just this.

`template< typename A, typename B, typename C, typename D, typename E > `

auto map( const A x, B in_min, C in_max, D out_min, E out_max ) -> decltype( x * in_min * in_max * out_min * out_max )

{

typedef decltype( x * in_min * in_max * out_min * out_max) T_out;

//((x < in_min)? in_min : ((x > in_max)? in_max : x)) -> constrain without overhead

return (T_out)( ((x < in_min)? in_min : ((x > in_max)? in_max : x)) - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;

}

So no Strings and/or strings and were good to go.

Thanks Paul