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)