Merge pull request #11523 from hugueskamba/hk-correct-force-inline-syntax-for-iar

Correct force inline syntax for IAR compiler
pull/11541/head
Martin Kojtal 2019-09-20 14:19:05 +02:00 committed by GitHub
commit e6d9d515e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -83,8 +83,12 @@ public:
* @param func pointer to the function to be called
* @param t the time between calls in seconds
*/
template <typename F>
MBED_FORCEINLINE void attach(F &&func, float t)
#if defined(__ICCARM__)
MBED_FORCEINLINE template <typename F>
#else
template <typename F> MBED_FORCEINLINE
#endif
void attach(F &&func, float t)
{
attach_us(std::forward<F>(func), t * 1000000.0f);
}