2016-03-03 23:18 GMT+01:00 Daniel Frey
On 03.03.2016, at 22:57, Andrzej Krzemienski
wrote: The Standard ([meta.rel]) requires that in std::is_base_of D must be a complete type, but it does not require the same of B. This makes sense, because if we compare a complete type D and an incomplete type B, the former is surely not derived from the latter. In contrast, boost::is_base_of imposes an additional constraint that B must also be complete. Could this restriction be lifted?
That would probably be possible for all modern compilers that have a proper std::is_base_of because it requires a compiler intrinsic (unless you can implement it without such an intrinsic and in C++98). Boost.TypeTraits have quite a history and by lifting the restriction, you would drop support for old compilers (think pre-C++11).
And if you really need this feature, why not use std::is_base_of directly? Either your compiler has it or it can’t be implemented AFAICT.
I need it for patching boost::optional. It must work on any system. I do
not know how to portably check if a given compiler defines std::is_base_of.
What I do not understand now is why the following small program compiles:
http://melpon.org/wandbox/permlink/2RCFt448BwwKcwob
I also paste it here
```
#include