Skip to content

Commit 6de0971

Browse files
committed
In common_func, force C++ linkage of arrcount_fails_if_not_array in case it gets included
inside extern "C".
1 parent 8482e4e commit 6de0971

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cores/nRF5/common_func.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939

4040

4141
#ifdef __cplusplus
42+
extern "C++" {
4243
// namespace and templates must be outside the `extern "C"` declaration...
4344
namespace ADAFRUIT_DETAIL
4445
{
@@ -48,6 +49,7 @@
4849
return N;
4950
}
5051
}
52+
}
5153
extern "C" {
5254
#define arrcount(arr) ADAFRUIT_DETAIL::arrcount_fails_if_not_array(arr)
5355
#define ADA_STATIC_ASSERT(const_expr, message) static_assert(const_expr, message)

0 commit comments

Comments
 (0)