lib: os: cbprintf: Prevent using _Generic in C++
Add guard to not use C11 specific feature when in C++. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
1f3758ff9e
commit
d863b93516
1 changed files with 2 additions and 2 deletions
|
@ -26,9 +26,9 @@ extern "C" {
|
|||
* - Clang 3.0 https://releases.llvm.org/3.0/docs/ClangReleaseNotes.html
|
||||
*/
|
||||
#ifndef Z_C_GENERIC
|
||||
#if ((__STDC_VERSION__ >= 201112L) || \
|
||||
#if !defined(__cplusplus) && (((__STDC_VERSION__ >= 201112L) || \
|
||||
((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40900) || \
|
||||
((__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) >= 30000))
|
||||
((__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) >= 30000)))
|
||||
#define Z_C_GENERIC 1
|
||||
#else
|
||||
#define Z_C_GENERIC 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue