fixed_math
fixed_math copied to clipboard
[BUG] fix compilation error in example code on README.md
Describe the bug There is an compilation error in example code on README.md. https://github.com/toge/fixed_math/tree/master?tab=readme-ov-file#example
Error Message is following:
test_package.cpp:32:31: error: unable to find numeric literal operator ‘operator""_fix’
32 | some_fixed = some_float * 2.45_fix; //operation with float is promoted to fixed_t
| ^~~~~~~~
It is lack of using fixedmath::operator ""_fix; or using namespace fixedmath;.
Not sure which is more appropriate for the fixed_math coding style.
Could you please fix it?
Build info:
- OS: Fedora Linux
- gcc 14.1.1
- libstdc++11
sure I'll create (ASAP) example.cc in fixedmath
mentioned operator is here
readme example is missing
using fixedmath::operator ""_fix;
@arturbac Thanks!