From a58f9e47b045e1d3aa44da9bf8e6760ab7b9e71d Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Fri, 3 May 2019 08:42:52 +0000 Subject: [PATCH] added __cplusplus when determining inline availability --- lib/hcl-cmn.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hcl-cmn.h b/lib/hcl-cmn.h index 3ea7208..9544364 100644 --- a/lib/hcl-cmn.h +++ b/lib/hcl-cmn.h @@ -757,8 +757,8 @@ typedef struct hcl_t hcl_t; # define HCL_PRIVATE #endif -#if defined(__STDC_VERSION__) && (__STDC_VERSION__>=199901L) - /* C99 has inline */ +#if defined(__cplusplus) || (defined(__STDC_VERSION__) && (__STDC_VERSION__>=199901L)) + /* C++/C99 has inline */ # define HCL_INLINE inline # define HCL_HAVE_INLINE #elif defined(__GNUC__) && defined(__GNUC_GNU_INLINE__)