Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime error, variadic.h error template #28

Open
justein opened this issue Sep 28, 2019 · 1 comment
Open

runtime error, variadic.h error template #28

justein opened this issue Sep 28, 2019 · 1 comment

Comments

@justein
Copy link

justein commented Sep 28, 2019

template <typename ReturnType, typename... Ts, typename Function, typename Accessor>
ReturnType unpack(Function function, Accessor accessor) {
return ReturnType(unpack<ReturnType, Ts...>(
std::move(function),
std::move(accessor),
typename MakeIndices<sizeof...(Ts)>::indices()));
}

template <typename ReturnType, typename... Ts, typename Function, typename Accessor, size_t... Is>
ReturnType unpack(Function function, Accessor accessor, Indices<Is...>) {
return ReturnType(function(accessor.template operator()(Is)...));
}

错误 C2059 语法错误:“template” yolo-app E:\correct\libtorch\include\torch\csrc\utils\variadic.h 195
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 C2951 模板 声明只能在全局、命名空间或类范围内使用 yolo-app E:\correct\libtorch\include\torch\csrc\utils\variadic.h 195

@zeta7337
Copy link

请问你解决了么,我也遇到了这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants