大佬教程收集整理的这篇文章主要介绍了c – 为什么在MSVC12中,is_copy_constructible为unique_ptr返回true,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
#include <type_Traits> #include <memory> int main() { static_assert(std::is_copy_constructible<std::unique_ptr<int>>::value,"UPtr has copy constructor?"); }
但是没有.
使用MSVC12编译:
答复是:
另请参阅此错误报告:std::is_copy_constructible doesn’t work correctly.
请注意,使用最新版本的Visual studio的webcompiler上的断言触发.最后一次更新是在2015年12月3日.断言也在cl(see it live)和gcc上触发.
我发现一个错误报告:A strange behavior of std::is_copy_constructible它与你的代码非常相似:
static_assert(std::is_copy_constructible<std::unique_ptr<int>>::value,"");
答复有:
以上是大佬教程为你收集整理的c – 为什么在MSVC12中,is_copy_constructible为unique_ptr返回true全部内容,希望文章能够帮你解决c – 为什么在MSVC12中,is_copy_constructible为unique_ptr返回true所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。