Make nvcc output traces on compile error

你离开我真会死。 提交于 2019-12-06 15:15:26

On the main question: There is no flag or anything that makes nvcc output more template information than there already is. The error shown is a syntax error rather than a template instantiation error but it is caused by a bug in CUDA 7.0.

Information on the bug for reference:
The bug occurs only in CUDA 7.0. It was not there in CUDA 6.5 and is fixed in CUDA 7.5RC and up. It only affects C++11 compilation mode (trying to compile the above code in C++98 is supposed to fail) The bug also occurs only with boost 1.5x (possibly 1.50 latest 1.52) where the decltype usage for boost::result_of was introduced. A more minimal example: Compilation error with nvcc and c++11, need minimal failing example

There are 3 possible work-arounds:

  1. Use std::result_of (c++11)
  2. Include <boost/utility/result_of.hpp> as the very first include
  3. Use the boost TR1 protocol and define BOOST_RESULT_OF_USE_TR1
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!