The reason is that is_virtual_base_of
, an implementation detail of Boost, tries to derive from its parameters to detemine (by comparing sizes) whether or not a class is the virtual base of another class.
At the time it was written, there were no final
classes and therefore this case has not been considered. You might want to ask on the Boost mailing list if someone could enhance/fix it, which might or might not be possible. Boost traditionally tried its best to detect type traits, but there are limits to what can be done. Most compilers have built-in methods to determine certain type properties because there is no way to detect them with only C++ code.