from ../3rdparty/javascriptcore/JavaScriptCore/wtf/Vector.h:24,
from ../3rdparty/javascriptcore/JavaScriptCore/pcre/pcre_exec.cpp:50:
../3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h:173:69: error: ‘std::tr1’ has not been declared
template struct HasTrivialConstructor : public std::tr1::has_trivial_constructor { };
^~~
../3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h:173:74: error: expected ‘{’ before ‘has_trivial_constructor’
template struct HasTrivialConstructor : public std::tr1::has_trivial_constructor { };
^~~~~~~~~~~~~~~~~~~
../3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h:174:68: error: ‘std::tr1’ has not been declared
template struct HasTrivialDestructor : public std::tr1::has_trivial_destructor { };
^~~
../3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h:174:73: error: expected ‘{’ before ‘has_trivial_destructor’
template struct HasTrivialDestructor : public std::tr1::has_trivial_destructor { };
^~~~~~~~~~~~~~~~~~
In file included from ../3rdparty/javascriptcore/JavaScriptCore/wtf/VectorTraits.h:24:0,
from ../3rdparty/javascriptcore/JavaScriptCore/wtf/Vector.h:27,
from ../3rdparty/javascriptcore/JavaScriptCore/pcre/pcre_exec.cpp:50:
../3rdparty/javascriptcore/JavaScriptCore/wtf/OwnPtr.h:43:21: warning: ‘template class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
OwnPtr(std::auto_ptr autoPtr) : m_ptr(autoPtr.release()) { }
^~~~
In file included from /usr/include/c++/7/memory:80:0,
from ../3rdparty/javascriptcore/JavaScriptCore/wtf/OwnPtr.h:29,
from ../3rdparty/javascriptcore/JavaScriptCore/wtf/VectorTraits.h:24,
from ../3rdparty/javascriptcore/JavaScriptCore/wtf/Vector.h:27,
from ../3rdparty/javascriptcore/JavaScriptCore/pcre/pcre_exec.cpp:50:
/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here
template class auto_ptr;
^~~~
In file included from ../3rdparty/javascriptcore/JavaScriptCore/wtf/VectorTraits.h:24:0,
from ../3rdparty/javascriptcore/JavaScriptCore/wtf/Vector.h:27,
from ../3rdparty/javascriptcore/JavaScriptCore/pcre/pcre_exec.cpp:50:
../3rdparty/javascriptcore/JavaScriptCore/wtf/OwnPtr.h:61:25: warning: ‘template class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
void adopt(std::auto_ptr autoPtr) { ASSERT(!autoPtr.get() || m_ptr != autoPtr.get()); deleteOwnedPtr(m_ptr); m_ptr = autoPtr.release(); }
^~~~
In file included from /usr/include/c++/7/memory:80:0,
from ../3rdparty/javascriptcore/JavaScriptCore/wtf/OwnPtr.h:29,
from ../3rdparty/javascriptcore/JavaScriptCore/wtf/VectorTraits.h:24,
from ../3rdparty/javascriptcore/JavaScriptCore/wtf/Vector.h:27,
from ../3rdparty/javascriptcore/JavaScriptCore/pcre/pcre_exec.cpp:50:
/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here
template class auto_ptr;
^~~~
In file included from ../3rdparty/javascriptcore/JavaScriptCore/wtf/Vector.h:27:0,
from ../3rdparty/javascriptcore/JavaScriptCore/pcre/pcre_exec.cpp:50:
../3rdparty/javascriptcore/JavaScriptCore/wtf/VectorTraits.h:84:30: warning: ‘template class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
struct VectorTraits
解决:
https://blog.youkuaiyun.com/baidu_33850454/article/details/79147161

在编译Qt时遇到关于std::tr1未声明的错误,具体错误出现在wtf/TypeTraits.h文件中。错误同时涉及到has_trivial_constructor和has_trivial_destructor。此外,还警告std::auto_ptr已过时。参考链接提供了一个解决方案。
2533

被折叠的 条评论
为什么被折叠?



