Project

General

Profile

Using Wt::dbo in a project with RTTI disabled

Added by Dave Far over 5 years ago

Hello,

I would like to use Wt::dbo without having Runtime Type Information in our project (due to LLVM), i.e. we compile with -fno-rtti.

But then I get the following error:

In file included from /usr/local/include/Wt/cpp17/any.hpp:78:

/usr/local/include/Wt/cpp17/any/any.hpp:133:25: error: cannot use typeid with -fno-rtti

return empty()? typeid(void) : this~~vtable~~>type();

^

/usr/local/include/Wt/cpp17/any/any.hpp:207:20: error: cannot use typeid with -fno-rtti

return typeid(T);

Is it possible to somehow use Wt::dbo in a project which has "-fno-rtti" set?

Would I have to change parts of Wt::dbo myself? How strongly does Wt and Wt::dbo rely on RTTI? I did also typeid being used in

usr/local/include/Wt/Dbo/ptr_impl.h:439:51.

Best

David


Replies (2)

RE: Using Wt::dbo in a project with RTTI disabled - Added by Koen Deforche over 5 years ago

Hey,

There will be more features in Wt::Dbo that do not work, which use dynamic_cast and typeid operator.

I don't think it's feasible, or at least, it is going to be very hard.

Regards,

koen

RE: Using Wt::dbo in a project with RTTI disabled - Added by Dave Far over 5 years ago

Thank you very much for your quick reply, koen.

Too bad that modifying Wt::dbo itself will likely not be feasible; but good to know, so I will not even try.

Does anyone have experience with mixing RTTI with nonRTTI modules (with -fvisibility=hidden)? I could put all code that uses Wt::Dbo into an own module with RTTI enabled, but would probably still have objects with vtables passing the module border --- in both directions.

Thanks

David

    (1-2/2)