nvcc 抛出
/usr/include/boost/concept/detail/has_constraints.hpp:29: error: ‘&’ cannot appear in a constant-expression
/usr/include/boost/concept/detail/has_constraints.hpp:29: error: template argument 2 is invalid
has_constraints.hpp 中已经有一些可疑代码:
#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580)
// Work around the following bogus error in Sun Studio 11, by
// turning off the has_constraints function entirely:
// Error: complex expression not allowed in dependent template
// argument expression
inline no has_constraints_(...);
#else
template <class Model>
inline yes has_constraints_(Model*, wrap_constraints<Model,&Model::constraints>* = 0);
inline no has_constraints_(...);
#endif
问题:这是 nvcc boost 不兼容还是我的代码有问题?