Merge pull request #675 from pyro9/fix_extern

Allow common_func.h to compile without error when it is included inside extern "C"
This commit is contained in:
Ha Thach authored and GitHub committed 2021-07-13 22:09:27 +07:00
commit 83c21dc06f
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)