mirror of https://github.com/ARMmbed/mbed-os.git
Correct force inline syntax for IAR compiler
Unlinke other compilers supported, the IAR compiler requires the pre-processor extension to force inline a method to be placed before the keyword `template` if the method is declared with one.pull/11523/head
parent
4f7339af78
commit
e2aeb601f1
|
@ -83,8 +83,12 @@ public:
|
||||||
* @param func pointer to the function to be called
|
* @param func pointer to the function to be called
|
||||||
* @param t the time between calls in seconds
|
* @param t the time between calls in seconds
|
||||||
*/
|
*/
|
||||||
template <typename F>
|
#if defined(__ICCARM__)
|
||||||
MBED_FORCEINLINE void attach(F &&func, float t)
|
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);
|
attach_us(std::forward<F>(func), t * 1000000.0f);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue