I didn't see a way to create a ticket, but I encountered a compilation error on one system that defines a function int raise(int) in signal.h: ../deps/half/include/half.hpp:1342:21: error: call of overloaded 'raise(<unnamed enum="">)' is ambiguous raise(FE_INEXACT); ^ ../deps/half/include/half.hpp:625:15: note: candidate: void half_float::detail::raise(int, bool) inline void raise(int HALF_UNUSED_NOERR(flags), bool HALF_UNUSED_NOERR(cond) = true)</unnamed> ...sysroot/usr/include/signal.h:138:12:...
How about adding integer to half conversion? Even though this is actually an error-prone conversion, int-to-float conversion is still done implicitly as part of c++ standard. I'm just trying to make this work better for code templates that may be used with or without half library present. Alternatively, if want to avoid all implicit narrowing conversions, could we at least support implicit uint8_t or int8_t to half conversion? This is a lossless conversion and when I tried that it also didn't work....
How about adding integer to half conversion? Even though this is actually an error-prone conversion, int-to-float conversion is still done implicitly as part of c++ standard. I'm just trying to make this work better for code templates that may be used with or without half library present. Alternatively, if want to avoid all implicit narrowing conversions, could we at least support implicit uint8_t or int8_t to float conversion? This is a lossless conversion and when I tried that it also didn't work....
This relates somewhat to the other discussion topic (https://sourceforge.net/p/half/discussion/general/thread/36919c68c5/#a326). I am running into many issues when trying to convert code that worked before with all the built-in float types to start using the half float type, having to add in explicit conversions all over. In some cases, I have to add custom code when templating to check if type is half so that it will operate in a different way than with the other types, especially when using std::complex<half>....
I think you should consider adding implicit casting from float to half rather than explicit. Even though this is a narrowing conversion, it would be really helpful if the half type behaved the same as built-in float types. Otherwise, I am running into many issues when trying to convert code that worked before with all the built-in float types to start using the half float type, having to add in explicit conversions all over. In some cases, I have to add custom code when templating to check if type...