Fix "call of overloaded 'lerp' is ambiguous"#297
Fix "call of overloaded 'lerp' is ambiguous"#297mmaciola wants to merge 1 commit intorive-app:masterfrom
Conversation
lerp function in src/shapes/metrics_path.cpp was causing an error:
error: call of overloaded ‘lerp(float&, const float&, float&)’ is ambiguous
/usr/include/c++/9/cmath:1919:3: note: candidate: ‘constexpr long double std::lerp(long double, long double, long double)’
1919 | lerp(long double __a, long double __b, long double __t) noexcept
| ^~~~
/usr/include/c++/9/cmath:1915:3: note: candidate: ‘constexpr double std::lerp(double, double, double)’
1915 | lerp(double __a, double __b, double __t) noexcept
| ^~~~
/usr/include/c++/9/cmath:1911:3: note: candidate: ‘constexpr float std::lerp(float, float, float)’
1911 | lerp(float __a, float __b, float __t) noexcept
| ^~~~
../submodule/rive-cpp/src/shapes/metrics_path.cpp:247:7: note: candidate: ‘float lerp(float, float, float)’
247 | float lerp(float from, float to, float f) { return from + f * (to - from); }
| ^~~~
ninja: build stopped: subcommand failed.
Function was renamed to calcLerp().
|
Does the error go away if you just mark the existing lerp() function as 'static' ? |
|
@mikerreed Nope. Marking existing lerp() function as 'static' doesn't fix the problem. |
|
Weird that it's resolving the std::lerp, I don't think we're explicitly |
|
we are unlikely to do a rename -- as that feels like running away for a larger problem -- we'd need to understand why your seeing this conflict while none of our configs see it, and then figure out where the actual problem is. |
lerp function in
src/shapes/metrics_path.cppwas causing an error:error: call of overloaded ‘lerp(float&, const float&, float&)’ is ambiguousFunction was renamed to
calcLerp.