problem with default move assignment operator in C++11

problem with default move assignment operator in C++11

It seems the Intel compiler cannot do the default move assignment operator; The following simple code

      struct my_struct {

        double X;

        my_struct& operator=(my_struct&&) = default;

     };

fails to compile (with icpc 13.0.1 using -std=c++11) with the error message "invalid type for defaulted assignment operator". However, the code appears to be correct.

2 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项

yes as noted in this thread:
http://software.intel.com/en-us/forums/topic/336155

Generated move constructors and move assignment operators are not supported in 13.0.

发表评论

登录添加评论。还不是成员?立即加入