当前位置: 首页> 游戏> 评测 > 观澜网站建设_全国推广优化网站_网络推广网络营销和网站推广的区别_百度搜索引擎优化详解

观澜网站建设_全国推广优化网站_网络推广网络营销和网站推广的区别_百度搜索引擎优化详解

时间:2025/7/12 0:33:30来源:https://blog.csdn.net/scarlettsp/article/details/143779871 浏览次数:0次
观澜网站建设_全国推广优化网站_网络推广网络营销和网站推广的区别_百度搜索引擎优化详解

警告的意思 :使用了表达式的结果作为条件判断的变量

GCC还是希望代码尽量的没有争议,将表达式的结果去进行判断。

改法 :先将表达式的结果计算出来,在传入 if ,for,while 之类的()里面去

if (payload.error = std::forward<Invocable>(f)(payload.attribute))

改为

 payload.error = std::forward<Invocable>(f)(payload.attribute);
 if (payload.error)


https://github.com/NVIDIA/cub/issues/219

In file included from /thrust/cub/block/../iterator/cache_modified_input_iterator.cuh:42:
/thrust/cub/block/../iterator/../util_device.cuh:323:35: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]if (payload.error = std::forward<Invocable>(f)(payload.attribute))~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/thrust/cub/block/../iterator/../util_device.cuh:323:35: note: place parentheses around the assignment to silence this warningif (payload.error = std::forward<Invocable>(f)(payload.attribute))^(                                                            )
/thrust/cub/block/../iterator/../util_device.cuh:323:35: note: use '==' to turn this assignment into an equality comparisonif (payload.error = std::forward<Invocable>(f)(payload.attribute))^==Would it make sense to split this into two lines?payload.error = std::forward<Invocable>(f)(payload.attribute);if (payload.error)

关键字:观澜网站建设_全国推广优化网站_网络推广网络营销和网站推广的区别_百度搜索引擎优化详解

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: