C++,会员地址
我正在尝试让 nvcc (g++/EDG) 与最新的 boost 配合良好,
template<typename U> \
static false_type has_member(tester<&U::member_name>*); \
您
/opt/boost/include/boost/thread/locks.hpp:65: error: ‘&’ cannot appear in a constant-expression
/opt/boost/include/boost/thread/locks.hpp:65: error: template argument 1 is invalid
知道如何修复它吗?
I am trying to make nvcc (g++/EDG) play nicely with latest boost
template<typename U> \
static false_type has_member(tester<&U::member_name>*); \
gives
/opt/boost/include/boost/thread/locks.hpp:65: error: ‘&’ cannot appear in a constant-expression
/opt/boost/include/boost/thread/locks.hpp:65: error: template argument 1 is invalid
any idea how to fix it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您使用什么版本的 nvcc?
我尝试在以下更简单的情况下重现错误,但编译成功(CUDA 3.2):
What version of nvcc are you using?
I tried reproducing the error in the following simpler case, but it succeeded with compilation (CUDA 3.2):