Exception handling warning? #504

Closed
opened 2016-01-24 17:54:37 +00:00 by vexe · 4 comments
vexe commented 2016-01-24 17:54:37 +00:00 (Migrated from github.com)

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!

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 commented 2016-01-24 19:06:04 +00:00 (Migrated from github.com)

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.

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 <new> and that may be beneficial workaround.
ocornut commented 2016-01-25 10:16:03 +00:00 (Migrated from github.com)
See https://github.com/ocornut/imgui/issues/484
MrSapps commented 2016-01-25 18:01:28 +00:00 (Migrated from github.com)

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

You would probably have to use new (std::nothrow) everywhere and then abort/exit/die in some way if it returns null.
ocornut commented 2016-01-25 21:55:16 +00:00 (Migrated from github.com)

@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)

@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 in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ocornut/imgui#504
No description provided.