diff --git a/internal/mesh/shim/repeater/HostArduino.h b/internal/mesh/shim/repeater/HostArduino.h index ffa43e14..e32a65d5 100644 --- a/internal/mesh/shim/repeater/HostArduino.h +++ b/internal/mesh/shim/repeater/HostArduino.h @@ -11,6 +11,8 @@ #include #include +#include + // Seeded rather than entropic: a run has to be reproducible from its seed, and // the identity a node generates comes through here. inline void randomSeed(unsigned long seed) { srandom(seed); } @@ -21,15 +23,15 @@ inline void randomSeed(unsigned long seed) { srandom(seed); } // like a macro call with one argument. That produced 368 errors inside libstdc++ // and none in any MeshCore file, which is a confusing place to start debugging. template -constexpr auto min(T a, U b) -> decltype(a < b ? a : b) { +constexpr auto min(T a, U b) -> std::decay_t { return a < b ? a : b; } template -constexpr auto max(T a, U b) -> decltype(a > b ? a : b) { +constexpr auto max(T a, U b) -> std::decay_t b ? a : b)> { return a > b ? a : b; } template -constexpr auto constrain(T v, L lo, H hi) -> decltype(v < lo ? lo : (v > hi ? hi : v)) { +constexpr auto constrain(T v, L lo, H hi) -> std::decay_t hi ? hi : v))> { return v < lo ? lo : (v > hi ? hi : v); }