正如问题所述,我正在使用模板,确切地说是一个模板类。有关的代码位于模板类的公共成员函数中,是一个简单的exit(1);
命令。产生的错误消息是error: there are no arguments to ‘exit’ that depend on a template parameter, so a declaration of ‘exit’ must be available [-fpermissive]
。只有在使用g++ 4.8.1编译后才会出现此错误,而4.2.1则没有出现此错误。