
On Sun, May 9, 2010 at 5:04 AM, John Maddock <boost.regex@virgin.net> wrote:
The following code gives the GCC compiler error below for Boost 1.42.0 while it compiles just fine for Boost 1.34.1.
Is this a bug in Boost.TypeTraits for 1.42.0?
No it's a feature... sort of.
Part of the requirements on the template parameters for is_base_of are that they are complete types, if they're not complete types then our implementation can silently do the wrong thing, so we assert that they are complete inside the implementation. The change was introduced as a bug fix to another issue, and simply asserts what we have always documented, so I'm afraid you're out of luck in that particular use case :-(
The same applies to std::is_base_of I believe as well.
OK, I see (and now I remember reading about this requirement in the documentation a while back). I was (incorrectly) using this together with MPL_ASSERT just to raise a more descriptive error message. However, this static check is not necessary as my code will eventually fail somehow if `y` is not a base of `x`. Thank you for the clarification. -- Lorenzo