
11 Mar
2009
11 Mar
'09
4:31 p.m.
On Wed, Mar 11, 2009 at 12:22 PM, John Maddock <john@johnmaddock.co.uk>wrote:
I'm still having some problems with this. Some compilers are flaging as an
error the case where B doesn't have a default constructor.
Rightly too I suspect :-(
I don't think that should be an error -- a warning, maybe, but not an error. We are never actually creating an instance of X anywhere so there is no actual problem. Another thing that should probably be handled is yielding false when D and/or B is not a class type rather than error. Also, it might be better to reorder the template arguments so that it is "Base, Derived" not "Derived, Base" as the name suggests and to be consistent with is_base_of. -- -Matt Calabrese