I could not find any "unary type trait", similar to std::is_integral for fpm::fixed<> so I wrote it. There may be more that would be good to implement but this was just the one I needed.
fpm::is_fixed_v is behind #ifdef as it requires C++17
I hope this is the correct approach and naming (matches std better than fpm::is_fixed_number). I've placed it at the end of fixed.hpp as I did not want to mess any of your formatting or layout.
I recommend checking <type_traits> as there may be some official one you may want to implement (I don't have enough experience in those but std::is_arithmetic seems like one of those).
I could not find any "unary type trait", similar to
std::is_integral
forfpm::fixed<>
so I wrote it. There may be more that would be good to implement but this was just the one I needed.fpm::is_fixed_v
is behind#ifdef
as it requires C++17I hope this is the correct approach and naming (matches
std
better thanfpm::is_fixed_number
). I've placed it at the end offixed.hpp
as I did not want to mess any of your formatting or layout.I recommend checking
<type_traits>
as there may be some official one you may want to implement (I don't have enough experience in those butstd::is_arithmetic
seems like one of those).