RTTI and portability in C ++

If the compiler does not support RTTI, does this mean that the compiler cannot process class hierarchies that have virtual functions? Or did I misunderstand the literature that RTTI is not portable and the problems are somewhere else?

Thank you all for your comments!

+3
source share
4 answers

For virtual functions, RTTI is not required.

Mostly used for dynamic_castand typeid.

+9
source

This is most likely the bigger answer you were looking for, but here goes:

RTTI "", , A A B B, A, RTTI, RTTI- a b . , .

90- , . , , : ++ , ++ , . , ++ C, , , , .

90- , , , . : , USPO " ". , .

C " " . , , , : , " IP". - IP-, , , , . : IP , IP. IP, , .

open source: IP , IP-. , - . . , , IP , . , " " .

: ( RTTI) , , ++ . ++- " ", Perl, Python, JavaScript .. ++ , , , RTTI ( ++, ), ++, , , .

( ) , , RTTI RTTI, , . , Don Box "Essential COM".

+13

RTTI, , , type_info::name().

, c++filt , () ​​ ++.

+1

RTTI, , , ?

, ++ RTTI... .

, RTTI , - ?

RTTI ... .

ELF (Linux) (.. dlopen) dynamic_cast , (-rdynamic).

... .

0

Source: https://habr.com/ru/post/1742703/


All Articles