From 66476070a58714f0579e785a6eb6552ce72951cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Duda?= Date: Fri, 1 Feb 2019 18:26:33 +0100 Subject: [PATCH] [toolchain] define __COUNTER__ for keil compiler (#3545) --- src/core/utils/static_assert.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/utils/static_assert.hpp b/src/core/utils/static_assert.hpp index 6ed9fbff3..de25c704a 100644 --- a/src/core/utils/static_assert.hpp +++ b/src/core/utils/static_assert.hpp @@ -36,6 +36,13 @@ #ifdef __cplusplus +/** + * Some compilers such as Keil MDK-ARM does not support __COUNTER__ macro. + */ +#ifndef __COUNTER__ +#define __COUNTER__ __LINE__ +#endif + namespace ot { template struct StaticAssertError;