From 6de09711997fe8b1018bbbebe76c227e54b397c9 Mon Sep 17 00:00:00 2001 From: Steven James Date: Mon, 12 Jul 2021 15:43:24 -0400 Subject: [PATCH] In common_func, force C++ linkage of arrcount_fails_if_not_array in case it gets included inside extern "C". --- cores/nRF5/common_func.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cores/nRF5/common_func.h b/cores/nRF5/common_func.h index 127b00d1..2667ca20 100644 --- a/cores/nRF5/common_func.h +++ b/cores/nRF5/common_func.h @@ -39,6 +39,7 @@ #ifdef __cplusplus + extern "C++" { // namespace and templates must be outside the `extern "C"` declaration... namespace ADAFRUIT_DETAIL { @@ -48,6 +49,7 @@ return N; } } + } extern "C" { #define arrcount(arr) ADAFRUIT_DETAIL::arrcount_fails_if_not_array(arr) #define ADA_STATIC_ASSERT(const_expr, message) static_assert(const_expr, message)