diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index fcc90b4d8ae..206cc569c55 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -358,6 +358,17 @@ #endif #endif +/* + * noexcept keyword added in C++11. + */ +#if defined(__cplusplus) && __cplusplus >= 201103L +#define __noexcept noexcept +#define __noexcept_if(__c) noexcept(__c) +#else +#define __noexcept +#define __noexcept_if(__c) +#endif + /* * We use `__restrict' as a way to define the `restrict' type qualifier * without disturbing older software that is unaware of C99 keywords.