Reorder <complex.h> and <complex> includes
In order to fix the build on gcc-4.8, reorder the <complex.h> include to always be first, followed by undefinition of the "complex" symbol, and then finally include the C++ <complex> .
This commit is contained in:
parent
5d64e298c3
commit
e5e391411f
|
@ -5,13 +5,16 @@
|
||||||
* License: GPLv3
|
* License: GPLv3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "iir++.h"
|
// we need to include "iir.h" first, as it pulls in <complex.h>, which we need
|
||||||
|
// to take effect before "iir++.h" pulls in <complex>
|
||||||
#include "iir.h"
|
#include "iir.h"
|
||||||
|
|
||||||
// iir.h includes <complex.h>, which #defines complex to _Complex. That's fine
|
// now remove the preprocessor definition of complex to _Complex, which is fine
|
||||||
// for the C header above, but will mess with our code definitions below.
|
// for the C header but not good for the C++ header
|
||||||
#undef complex
|
#undef complex
|
||||||
|
|
||||||
|
#include "iir++.h"
|
||||||
|
|
||||||
// Below are all the includes used throughout the library.
|
// Below are all the includes used throughout the library.
|
||||||
|
|
||||||
namespace IIR {
|
namespace IIR {
|
||||||
|
|
Loading…
Reference in New Issue