- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试从 https://github.com/Sami-Vuorela/aatc 编译代码
我正在使用 LLVM em++ 编译器进行编译:
这是控制台错误信息:
/opt/emsdk_portable/emscripten/master/em++ -Qunused-arguments -U__STRICT_ANSI__ -Wall -fno-strict-aliasing -std=c++11 -DAS_WRITE_OPS=0 -DAS_USE_STLNAMES=1 -DAS_USE_FLOAT=0 -Iinclude/ -Iangelscript/sdk/angelscript/include/ -Iangelscript/sdk/add_on/scriptbuilder/ -Iangelscript/sdk/add_on/contextmgr/ -Iangelscript/sdk/add_on/scripthelper/ -Iangelscript/sdk/add_on/scriptany/ -Iangelscript/sdk/add_on/scriptstdstring/ -Iangelscript/sdk/add_on/scriptdictionary/ -Iangelscript/sdk/add_on/scriptarray/ -Iangelscript/sdk/add_on/scriptmath/ -Iangelscript/sdk/add_on/scriptgrid/ -c aatc/source/aatc_registration_tempspecs.cpp -o aatc/source/aatc_registration_tempspecs.o
In file included from aatc/source/aatc_registration_tempspecs.cpp:40:
In file included from aatc/source/aatc_tempspecs.hpp:37:
aatc/source/aatc_shared_tempspec.hpp:52:11: error: expected a qualified name after 'typename'
typename typedef T_container::iterator iteratortype;
^
aatc/source/aatc_shared_tempspec.hpp:52:11: error: expected member name or ';' after declaration specifiers
typename typedef T_container::iterator iteratortype;
^
aatc/source/aatc_shared_tempspec.hpp:97:18: error: cannot specialize a function 'Push_Back' within class scope
template<> void Push_Back<aatc_Y>(const T_content& value){
^
aatc/source/aatc_shared_tempspec.hpp:101:18: error: cannot specialize a function 'Pop_Back' within class scope
template<> void Pop_Back<aatc_Y>(){
^
aatc/source/aatc_shared_tempspec.hpp:106:25: error: cannot specialize a function 'Register_func_back_write' within
class scope
template<> static void Register_func_back_write<aatc_Y>(asIScriptEngine* engine, int& r, char* text...
^
aatc/source/aatc_shared_tempspec.hpp:114:24: error: cannot specialize a function 'Back' within class scope
template<> T_content& Back<aatc_Y>(){
^
aatc/source/aatc_shared_tempspec.hpp:119:25: error: cannot specialize a function 'Register_func_back_read' within
class scope
template<> static void Register_func_back_read<aatc_Y>(asIScriptEngine* engine, int& r, char* textb...
^
aatc/source/aatc_shared_tempspec.hpp:126:18: error: cannot specialize a function 'Push_Front' within class scope
template<> void Push_Front<aatc_Y>(const T_content& value){
^
aatc/source/aatc_shared_tempspec.hpp:130:18: error: cannot specialize a function 'Pop_Front' within class scope
template<> void Pop_Front<aatc_Y>(){
^
aatc/source/aatc_shared_tempspec.hpp:135:25: error: cannot specialize a function 'Register_func_front_write' within
class scope
template<> static void Register_func_front_write<aatc_Y>(asIScriptEngine* engine, int& r, char* tex...
^
aatc/source/aatc_shared_tempspec.hpp:143:24: error: cannot specialize a function 'Front' within class scope
template<> T_content& Front<aatc_Y>(){
^
aatc/source/aatc_shared_tempspec.hpp:148:25: error: cannot specialize a function 'Register_func_front_read' within
class scope
template<> static void Register_func_front_read<aatc_Y>(asIScriptEngine* engine, int& r, char* text...
^
aatc/source/aatc_shared_tempspec.hpp:167:18: error: cannot specialize a function 'Erase_value' within class scope
template<> void Erase_value<aatc_Y>(const T_content& value){
^
aatc/source/aatc_shared_tempspec.hpp:172:25: error: cannot specialize a function 'Register_func_erase_value' within
class scope
template<> static void Register_func_erase_value<aatc_Y>(asIScriptEngine* engine, int& r, char* tex...
^
aatc/source/aatc_shared_tempspec.hpp:180:24: error: cannot specialize a function 'op_index' within class scope
template<> T_content& op_index<aatc_Y>(aatc_type_sizetype index){
^
aatc/source/aatc_shared_tempspec.hpp:186:25: error: cannot specialize a function 'Register_func_op_index' within
class scope
template<> static void Register_func_op_index<aatc_Y>(asIScriptEngine* engine, int& r, char* textbu...
^
aatc/source/aatc_shared_tempspec.hpp:192:18: error: cannot specialize a function 'Reserve' within class scope
template<> void Reserve<aatc_Y>(aatc_type_sizetype count){
^
aatc/source/aatc_shared_tempspec.hpp:197:25: error: cannot specialize a function 'Register_func_reserve' within
class scope
template<> static void Register_func_reserve<aatc_Y>(asIScriptEngine* engine, int& r, char* textbuf...
^
aatc/source/aatc_shared_tempspec.hpp:203:18: error: cannot specialize a function 'Insert' within class scope
template<> void Insert<aatc_Y>(const T_content& value){
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
我该如何解决这个问题?
最佳答案
typename
和typedef
的顺序颠倒了,应该是:
typedef typename T_container::iterator iteratortype;
那是因为 typename
修饰了限定名 T_container::iterator
,整个修饰的东西是 typedef
的主题。
另一组错误是不言自明的:代码显然包含在类中声明的模板特化,这不是合法的 C++。所以不是这样的:
class X
{
template <class T>
void Erase_value(const T_content& value);
template <>
void Erase_value<aatc_Y>(const T_content& value){ /* ... */ }
};
一定是这样的:
class X
{
template <class T>
void Erase_value(const T_content& value);
};
template <>
void X::Erase_value<aatc_Y>(const T_content& value){ /* ... */ }
关于C++模板类编译报错信息: error: expected a qualified name after 'typename' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30211697/
我正在努力学习本教程 https://github.com/cf-platform-eng/spring-boot-cities/tree/master/cities-service在 Cloud F
0){ echo "Username or email already exists."; }else{ $query = mysql_que
我想在Linux上编译ARToolKit源码,下载源码,按照ARToolKit文档,配置GLUT , OpenGL, libjpeg 等库。 转到 ARToolKit 目录并键入 ./Configer
你好,我在这个程序中遇到错误,wcout 不是 `std' 的成员。如您所见,我也使用了 iostream,但没有用。我有 Dev-C++ 4.9.9.2,我的操作系统是 XP SP3我需要你的帮助。
我尝试对一个网站进行多次投票,但我得到: panic: runtime error: invalid memory address or nil pointer dereference [signal
当我将“ using namespace std; int main(){ string s[30]; int n = 20; for(int i = 0; i using
我设置了 EMAIL_URL process.env.MAIL_URL="smtp://xx%40gmail.com:yyy@smtp.gmail.com:465" 这个工作找到了 Email.sen
我有如下文件夹结构 . ├── docker-compose.yml └── web-app ├── create_tomcat_admin.sh ├── Dockerfile
这是我在 php 中的查询代码: $query3 = mysql_query("SELECT * FROM area_of_work") or die('Invalid query:'. mysql_
我正在尝试将 therubyracer/therubyracer-heroku 安装到我的应用程序,因为它在 heroku 服务器中不起作用,因为我没有 javascript 运行时环境。 当我尝试安
我正在开发一个非常简单的 React 应用程序。它有一个组件,在这个组件中,我试图在单击链接时设置状态。但出于某种原因,setState 甚至没有得到认可。它带有下划线,表示未解析的函数或方法 set
我有三个来源:代码处理.h typedef enum {typeBool, typeVarDeclaration, typeFuncDeclaration } nodeEnum; typedef st
我正在尝试从我的 Android 手机向 raspi 发送连续的命令。我使用了此链接中的代码,但出现错误。 链接:https://stackoverflow.com/questions/2347143
我正在尝试从数据库中加载数据并将其放入不同的 View 中。 log cat 返回错误,它找不到“_id”列。 有人可以帮我解决这个问题吗? SqlHelper代码: public class Fib
我的alertview给出了这个问题..它与sqlite无关..它给出了一些信息.. 我该如何解决这个问题? UIAlertView *infoShow = [[UIAlertView alloc]
这个问题在这里已经有了答案: launch activities from different package (5 个答案) 关闭 10 年前。 最近我一直在开发一个新的应用程序,我正在尝试使用
这是我的代码: #include #include typedef struct test { int *a; char *s; }TEST; int main (void) {
所以我定义了一个函数,如果它是由它的 lonesome 实现的,那么它非常适合对线性数组进行合并排序,但是如果我把它放到一个类中,它就会出错。我认为这是一个很好的例子,说明我不太了解类(class)的
我是 IOS 新手。我有一个示例项目,并试图在此基础上学习 Obj-C。 现在我正处于学习如何使用 UIAlertController 的阶段。我有这样的代码: if (loanAmount == 0
当我尝试使用 wincachegrind 并获取 cachegrind 文件时,它返回 Cannot find call target. cachegrind.out line number:68 有
我是一名优秀的程序员,十分优秀!