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?
This seems to be a known bug.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With