In common_func, force C++ linkage of arrcount_fails_if_not_array in case it gets included

inside extern "C".
This commit is contained in:
Steven James committed 2021-07-12 15:43:24 -04:00
1 parent 8482e4e662
commit 6de0971199
1 file changed
+2
+2
View File
@@ -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)