Subject: Re: [boost] [type_traits] is_base_of<B, D> should work when B is incomplete
From: Daniel Frey (d.frey_at_[hidden])
Date: 2016-03-03 18:24:55
> On 03.03.2016, at 23:33, Matt Calabrese <rivorus_at_[hidden]> wrote:
> Excluding C++98 support, why do you need a compiler intrinsic for this
> change? If the reason is the incompleteness check, I've implemented
> completeness checking metafunctions before and it's fully possible without
> intrinsics in C++11. I described a completeness metafunction that works in
> practice a few years ago in a discussion on the mailing list here:
> which links to an implementation here: http://codepaste.net/xfgcu8 (there
> are subtleties to usage, of course). The code that is linked is old and not
> fully correct, although in the time since that thread, I have produced what
> I believe to be a fully correct and well tested implementation.
That is a very interesting technique, I didnât knew about it. But if std::is_base_of is available, boost::is_base_of should surely just forward to it, so only those compilers that donât have it (aka mostly pre-C++11 compilers) are of interest here. Maybe lifting the restriction (and using an alternative implementation) should be conditional, only to be guaranteed by boost::is_base_of when compiling with C++11 or newer?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk