Boost logo

Boost :

Subject: [boost] [1.50] [Config] Enhancing support of -fno-rtti on clang
From: Michel Morin (mimomorin_at_[hidden])
Date: 2012-05-25 18:59:26

When using clang with -fno-rtti, the use of `typeid` results in
either compile-time errors or run-time errors.

But Boost.Config did not define BOOST_NO_TYPEID for that case.
So, for example, including any client header of BOOST_SP_TYPEID
produced compiler errors on clang trunk with -fno-rtti.

This was fixed in r78510 about a week ago:

    -#if !__has_feature(cxx_rtti)
    +#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_RTTI)
     # define BOOST_NO_RTTI

    +#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_TYPEID)
    +# define BOOST_NO_TYPEID

If Boost would like to enhance the support of -fno-rtti on clang,
it would be good to merge the fix into the release branch.

I ran the test runner (clang trunk with -fno-rtti) for
unpatched release branch and patched release branch.
There was no regression and more than 1000 test results got


Boost list run by bdawes at, gregod at, cpdaniel at, john at