Include complex rather than complex.h in C++ contexts
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Tue, 5 Feb 2019 12:30:13 +0000 (13:30 +0100)
committerGitHub <noreply@github.com>
Tue, 5 Feb 2019 12:30:13 +0000 (13:30 +0100)
to avoid name clashes e.g. with boost headers that use I as a generic placeholder.
Fixes #1992 as suggested by aprokop in that issue ticket.

lapack-netlib/LAPACKE/include/lapacke.h

index 6ded78c..11740e1 100644 (file)
@@ -86,7 +86,11 @@ lapack_complex_float lapack_make_complex_float( float re, float im );
 
 /* Complex type (double precision) */
 #ifndef lapack_complex_double
+#ifndef __cplusplus
 #include <complex.h>
+#else
+#include <complex>
+#endif
 #define lapack_complex_double   double _Complex
 #endif