Given two very simple classes:
class X { }; class Y : public X { };
Why is it that, with Clang and GCC targeting C++14, std::is_assignable<X*, Y*>::value
is false
? It is true
with Clang on my setup when I target C++11.
This is because in your case X*
becomes an rvalue. You can't assign to an rvalue. Change to an lvalue instead:
std::is_assignable<X*&, Y*>::value // ~^~
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