You still need to define operator== if you define operator<=>
decimal_cast requires a template parameter, so you either use decimal_cast< Prec > or static_cast< decimal >, which are the same thing.
Also defining operator != is redundant because in c++20 it's implicitly defined as !(a == b), but i kept it for compatibility with older compilers anyway.
You still need to define operator== if you define operator<=> decimal_cast requires a template parameter, so you either use decimal_cast< Prec > or static_cast< decimal >, which are the same thing. Also defining operator != is redundant because in c++20 it's implicitly defined as !(a == b), but i kept it for compatibility with older compilers anyway.