https://issues.dlang.org/show_bug.cgi?id=17445
--- Comment #4 from Dario Schiavon <dario.schia...@gmail.com> --- Stanislav, thanks for the tip. I knew about isAssignable but I had somehow missed isCopyable, which is exactly what I needed. However, I still cannot make my code work because of the bug shown here. isAssignable only gives the right answer as long as I don't try to use it as a static-if condition. For example: enum bool isCopyable(T) = is(typeof(() { T* a; T b = *a; })); struct MyStruct { enum result = isCopyable!MyStruct; pragma(msg, result); //static if (result) {} } This code (with the static-if commented out) correctly prints true. But if I leave the static-if in the struct's body, it prints false (DMD 2.074.0). If the static-if is moved outside of the struct's body, or if the condition doesn't involve the struct's name, then everything works as expected - but that's not what I need. --