相关疑难解决方法(0)

g ++"不是类型"错误

写一个模板化的函数,我声明:

template <typename T>
T invertible(T const& container, T::size_type startIndex, T::size_type endIndex);
Run Code Online (Sandbox Code Playgroud)

用g ++ 4.0.1编译我得到了错误:

error: 'T::size_type' is not a type
Run Code Online (Sandbox Code Playgroud)

c++ gcc templates

8
推荐指数
2
解决办法
1万
查看次数

标签 统计

c++ ×1

gcc ×1

templates ×1