Skip to content
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

Exception handling warning? #504

Closed
vexe opened this issue Jan 24, 2016 · 4 comments
Closed

Exception handling warning? #504

vexe opened this issue Jan 24, 2016 · 4 comments

Comments

@vexe
Copy link

vexe commented Jan 24, 2016

Greetings,

I disable Exception handling when compiling and so when I include imgui in my project I get the warning:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\exception(361): warning C4577: 'noexcept' used with no exception handling mode specified; termination on exception is not guaranteed. Specify /EHsc

I checked all the imgui files they don't seem to be including something C++ specific they're all .h headers (except < new >?)

Any ideas which file is causing the warning?

Even if I knew I guess there's no way to get around it except to disable the warning, or replace whatever the functionality that's causing it.

Thanks!

@ocornut
Copy link
Owner

ocornut commented Jan 24, 2016

It's probably coming from the 'new' header. Sprinke #error directives to make sure it is. I don't know what is the fix, thou it was mentionned recently we can use placement new without including and that may be beneficial workaround.

@ocornut
Copy link
Owner

ocornut commented Jan 25, 2016

See #484

@MrSapps
Copy link

MrSapps commented Jan 25, 2016

You would probably have to use new (std::nothrow) everywhere and then abort/exit/die in some way if it returns null.

ocornut added a commit that referenced this issue Jan 25, 2016
(Now expecting something to fail somewhere..)
@ocornut
Copy link
Owner

ocornut commented Jan 25, 2016

@vexe - I have removed the dependency on <new> thanks to a suggestion by nem0.
I believe it should fix your issue (it if doesn't trigger some new issue on some platforms, finger crossed)

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

No branches or pull requests

3 participants