It seems GCC doesn't do type conversions with user-defined literals, so e.g. the -10
in -10_deg
is considered to be an integer.
Add .0
to all numbers and it should hopefully work:
static const float ANGLES[] = {-20.0_deg, -10.0_deg, 0.0_deg, 10.0_deg, 20.0_deg};
Of course, you can also add another operator function taking int
as argument.