Skip to content

Commit 7dfdbd5

Browse files
committed
fix a bug that gnu compiler failed
1 parent da811c1 commit 7dfdbd5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

source/module_base/math_chebyshev_def.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
#include "./constants.h"
22
#include "./tool_quit.h"
33
#include "assert.h"
4+
#include "./global_function.h"
45
namespace ModuleBase
56
{
67

78
template<typename REAL>
89
template<class T>
910
void Chebyshev<REAL>:: calcoef_real(T *ptr, REAL (T::*fun)(REAL))
1011
{
11-
complex<REAL> *pcoef = (complex<REAL> *)this->fftw.ccoef;
12+
std::complex<REAL> *pcoef = (std::complex<REAL> *)this->fftw.ccoef;
1213

1314
//three point = 2/3 M + 1/3 T;
1415
//-----------------------------------------------
@@ -66,7 +67,7 @@ template<typename REAL>
6667
template<class T>
6768
void Chebyshev<REAL>::calcoef_complex(T *ptr, std::complex<REAL> (T::*fun)(std::complex<REAL>))
6869
{
69-
complex<double> *pcoef = (complex<double> *)this->fftw.ccoef;
70+
std::complex<double> *pcoef = ( std::complex<double> *)this->fftw.ccoef;
7071

7172
//three point = 2/3 M + 1/3 T;
7273
//-----------------------------------------------
@@ -153,7 +154,7 @@ template<typename REAL>
153154
template<class T>
154155
void Chebyshev<REAL>::calcoef_pair(T *ptr, REAL (T::*fun1)(REAL), REAL (T::*fun2)(REAL))
155156
{
156-
complex<double> *pcoef = (complex<double> *)this->fftw.ccoef;
157+
std::complex<double> *pcoef = ( std::complex<double> *)this->fftw.ccoef;
157158

158159
//three point = 2/3 M + 1/3 T;
159160
//-----------------------------------------------

0 commit comments

Comments
 (0)