Boost logo

Boost :

Subject: [boost] [type_traits] revisiting is_virtual_base_of
From: John Maddock (jz.maddock_at_[hidden])
Date: 2018-02-02 19:13:03


There is a problem with is_virtual_base_of in that it doesn't work
especially well - most of the time it works OK, but can be made to fail
catastrophically in a few situations, see for example:
https://svn.boost.org/trac10/ticket/11323

Now... it turns out that with C++14 and later we now have is_detected
which can test the validity of almost any expression... and I'm
wondering if there's a cunning way to press this into action to create a
more accurate is_virtual_base_of, but I'm having trouble coming up with
anything.  Any bright ideas? Note that an explicit static_cast can't be
tested for, though we can use is_constructible if required.

Thanks in advance, John.

---
This email has been checked for viruses by AVG.
http://www.avg.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk