diff --git a/cbind/base/psb_c_base.h b/cbind/base/psb_c_base.h index 0e5a09f9..82c4cda9 100644 --- a/cbind/base/psb_c_base.h +++ b/cbind/base/psb_c_base.h @@ -32,8 +32,15 @@ extern "C" { typedef float psb_s_t; typedef double psb_d_t; - typedef float complex psb_c_t; - typedef double complex psb_z_t; + +#ifdef __cplusplus + using psb_c_t = std::complex; + using psb_z_t = std::complex; +#else + typedef float complex psb_c_t; + typedef float complex psb_z_t; +#endif + #define PSB_ERR_ERROR -1 #define PSB_ERR_SUCCESS 0