3
我有以下声明。gcc无法编译名称空间中的静态函数
namespace test{
static cl_option* find_opt(const int &val, const cl_option *options);
}
test::cl_option* test::find_opt(const int &val, cl_option *options){}
问题是编译时出现以下错误。
error: ‘test::cl_option* test::find_opt(const int&, test::cl_option*)’ should have been declared inside ‘test’
在此先感谢