[英]Type traits in VS2013
int main()
{
struct C {
C(const C&) = delete;
C& operator= (const C&) = delete;
C(C&&) {}
C& operator=(C&&) { return *this; }
};
static_assert(std::is_copy_constructible<C>::value &&
std::is_copy_constructible<C>::value,
"");
}
Why above code can be successfully compiled in VS2013? 为什么在VS2013中可以成功编译上面的代码?
This seems to be a known bug. 这似乎是一个已知的错误。
Link1: http://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken Link1: http : //connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken
Link2: http://connect.microsoft.com/VisualStudio/feedback/details/802032/std-is-copy-constructible-doesnt-work-correctly Link2: http : //connect.microsoft.com/VisualStudio/feedback/details/802032/std-is-copy-constructible-doesnt-work-correctly
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.