@ -278,43 +278,46 @@ constexpr auto operator /(const SFixed<IntegerLeft, FractionLeft> & left, const
return ( SFixed < Integer , Fraction > ( left ) op right ) ; \
return ( SFixed < Integer , Fraction > ( left ) op right ) ; \
}
}
# define OPERATORS( opType, op ) \
# define LOGIC_OPERATORS( type )\
opType # # _OPERATOR ( char , op ) \
LOGIC_OPERATOR ( type , = = ) \
opType # # _OPERATOR ( unsigned char , op ) \
LOGIC_OPERATOR ( type , ! = ) \
opType # # _OPERATOR ( signed char , op ) \
LOGIC_OPERATOR ( type , < ) \
opType # # _OPERATOR ( unsigned short int , op ) \
LOGIC_OPERATOR ( type , < = ) \
opType # # _OPERATOR ( signed short int , op ) \
LOGIC_OPERATOR ( type , > ) \
opType # # _OPERATOR ( unsigned int , op ) \
LOGIC_OPERATOR ( type , > = )
opType # # _OPERATOR ( signed int , op ) \
opType # # _OPERATOR ( unsigned long int , op ) \
# define ARITHMETIC_OPERATORS( type ) \
opType # # _OPERATOR ( signed long int , op ) \
ARITHMETIC_OPERATOR ( type , + ) \
opType # # _OPERATOR ( unsigned long long int , op ) \
ARITHMETIC_OPERATOR ( type , - ) \
opType # # _OPERATOR ( signed long long int , op ) \
ARITHMETIC_OPERATOR ( type , * ) \
opType # # _OPERATOR ( float , op ) \
ARITHMETIC_OPERATOR ( type , / )
opType # # _OPERATOR ( double , op ) \
opType # # _OPERATOR ( long double , op )
# define OPERATORS( type ) \
LOGIC_OPERATORS ( type ) \
# define LOGIC_OPERATORS( op ) OPERATORS( LOGIC, op )
ARITHMETIC_OPERATORS ( type )
# define ARITHMETIC_OPERATORS( op ) OPERATORS( ARITHMETIC, op )
OPERATORS ( float )
LOGIC_OPERATORS ( = = )
OPERATORS ( double )
LOGIC_OPERATORS ( ! = )
OPERATORS ( long double )
LOGIC_OPERATORS ( < )
LOGIC_OPERATORS ( > )
OPERATORS ( char )
LOGIC_OPERATORS ( < = )
OPERATORS ( unsigned char )
LOGIC_OPERATORS ( > = )
OPERATORS ( signed char )
OPERATORS ( unsigned short int )
ARITHMETIC_OPERATORS ( + )
OPERATORS ( signed short int )
ARITHMETIC_OPERATORS ( - )
OPERATORS ( unsigned int )
ARITHMETIC_OPERATORS ( * )
OPERATORS ( signed int )
ARITHMETIC_OPERATORS ( / )
OPERATORS ( unsigned long int )
OPERATORS ( signed long int )
OPERATORS ( unsigned long long int )
OPERATORS ( signed long long int )
// Prevent Macro-bleed:
// Prevent Macro-bleed:
# undef LOGIC_OPERATOR
# undef ARITHMETIC_OPERATOR
# undef OPERATORS
# undef OPERATORS
# undef LOGIC_OPERATORS
# undef ARITHMETIC_OPERATORS
# undef ARITHMETIC_OPERATORS
# undef LOGIC_OPERATORS
# undef ARITHMETIC_OPERATOR
# undef LOGIC_OPERATOR
FIXED_POINTS_END_NAMESPACE
FIXED_POINTS_END_NAMESPACE