diff --git a/drivers/Ticker.h b/drivers/Ticker.h index 362f74c4bd..daa5148927 100644 --- a/drivers/Ticker.h +++ b/drivers/Ticker.h @@ -83,8 +83,12 @@ public: * @param func pointer to the function to be called * @param t the time between calls in seconds */ - template - MBED_FORCEINLINE void attach(F &&func, float t) +#if defined(__ICCARM__) + MBED_FORCEINLINE template +#else + template MBED_FORCEINLINE +#endif + void attach(F &&func, float t) { attach_us(std::forward(func), t * 1000000.0f); }