
The code below does not compile, when, I believe, it should. Compiler says that you can't instantiate abstact class.
I'm really surprised - it is trivial use case, but I did not find a problem report. Do I miss something?
This is a tricky one; first the headline news: current cvs will compile that, and will report false whenever the "To" type is abstract, but only if you have a newish compiler that supports is_abstract. The reason for returning false, is that nothing is ever convertible to an abstract type, since no object of an abstract type can ever be created. Now for the problem: is general is_convertible<A,A> may not compile if A's copy-constructor is non-public. We'd love to be able to fix that, but no one knows how to detect whether a member is accessible or not. HTH, John.