No matching function for call to 'min(uint32_t&, unsigned int)' #1582
-
Hi, I was using an AVR Arduino with Adafruit's E-Ink Display library. Everything was fine. When I switched to STM32 Arduino Core (using Nucleo-64 L053R8) it threw an error saying:
Seems like
That seems to work for now. But what would be the right way to fix this issue? -Fahad |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @mirzafahad, The Adafruit's E-Ink Display library needs some updates to avoid this kind of issue and harden the code. |
Beta Was this translation helpful? Give feedback.
Hi @mirzafahad,
The core uses the STL C++.
min, max,... require to compare same type.
The Adafruit's E-Ink Display library needs some updates to avoid this kind of issue and harden the code.
uint32_t numbytes = min(remaining, (uint32_t)sizeof(block));
You should open an issue to this repo to fix all min/max call.