[英]error: no match for ‘operator<<’ (operand types are ‘std::ostream {aka std::basic_ostream<char>}’ and ‘std::ostream {aka std::basic_ostream<char>}’)
I am trying to build Tramonto fDFT package, but.cpp file got error like this: error: no match for 'operator<<' (operand types are 'std::ostream {aka std::basic_ostream}' and 'std::ostream {aka std::basic_ostream}') stream << x1.leftshift(stream) << " " << x2.leftshift(stream)我正在尝试构建 Tramonto fDFT package,但是.cpp 文件出现如下错误:错误:'operator<<' 不匹配(操作数类型为'std::ostream {aka std::basic_ostream}' 和'std:: ostream {aka std::basic_ostream}') stream << x1.leftshift(stream) << " " << x2.leftshift(stream)
Here is the code:这是代码:
ostream& NOXLOCA::Tramonto::PTVector::leftshift(ostream& stream) const
{
stream << "{ ";
stream << x1.leftshift(stream) << " " << x2.leftshift(stream)
<< " [ " << ptp << "] ";
stream << "}";
return stream;
}
ostream& operator<<(ostream& stream, const NOXLOCA::Tramonto::PTVector& v)
{
return v.leftshift(stream);
}
void NOXLOCA::Tramonto::PTVector::print(std::ostream& stream) const
{
stream << *this << endl;
}
You seem to be trying to build an old version of the library.您似乎正在尝试构建旧版本的库。 According to the project's github repository this has been fixed by commenting the offending lines four years ago.
根据项目的 github 存储库,这已在四年前通过评论违规行得到修复。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.