Skip to content

cpp2util.h: Fix typeid(T) -> Typeid<T> usage with -fno-rtti. #219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 11, 2023

Conversation

prenaux
Copy link
Contributor

@prenaux prenaux commented Jan 11, 2023

The no exception / no rtti modes seem to be working fine. Just this small fix needed.

Side note: I ended up defining CPP2_NO_EXCEPTIONS & CPP2_NO_RTTI in my build system. I did look at adding a preprocessor based auto-detection in cpp2util.h but it turns out that its compiler dependant so its a whole mess to do robustly, and it seems out of scope at least for now.

@prenaux prenaux force-pushed the pierre-fix-no-rtti-compilation-issue branch from 5127dd3 to 2d49a07 Compare January 11, 2023 06:52
@hsutter
Copy link
Owner

hsutter commented Jan 11, 2023

Looks good, thanks!

@hsutter hsutter merged commit 356b6c4 into hsutter:main Jan 11, 2023
@prenaux prenaux deleted the pierre-fix-no-rtti-compilation-issue branch January 14, 2023 13:34
Azmah-Bad pushed a commit to Azmah-Bad/cppfront that referenced this pull request Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants