我已经碰到过好几次这种错误了.
template<typename R> static_inline vec4<typename R::scalar> point(const rhs2<R> &v)
{
return vec4<P>(v.x, v.y, 0, 1);
}
template<typename R> static_inline vec4<typename R::scalar> point(const rhs3<R> &v)
{
return vec4<typename R::scalar>(v, 1);
}
template<typename R> static_inline vec4<R> point(const vec2<R> &v)
{
return vec4<P>(v.x, v.y, 0, 1);
}
template<typename R> static_inline vec4<R> point(const vec3<R> &v)
{
return vec4<R>(v, 1);
}
{
return vec4<P>(v.x, v.y, 0, 1);
}
template<typename R> static_inline vec4<typename R::scalar> point(const rhs3<R> &v)
{
return vec4<typename R::scalar>(v, 1);
}
template<typename R> static_inline vec4<R> point(const vec2<R> &v)
{
return vec4<P>(v.x, v.y, 0, 1);
}
template<typename R> static_inline vec4<R> point(const vec3<R> &v)
{
return vec4<R>(v, 1);
}
Devel/kcg/generic.h(1306): error: a class or namespace qualified name is required
template<typename R> static_inline vec4<typename R> point(const vec2<R> &v)