EASTL icon indicating copy to clipboard operation
EASTL copied to clipboard

EASTL throwing std::exceptions

Open DBJDBJ opened this issue 3 years ago • 3 comments

I assume EASTL is very rarely (if ever) used in a code that uses C++ exceptions. I have noticed EASTL if and when throwing uses and throws std::exception and derivatives.

If that is still the case, why is that?

Many thanks

ps: I do not use c++ exceptions

DBJDBJ avatar Nov 09 '20 11:11 DBJDBJ

We use the exceptions code path internally but its definitely not used as widely. This is an excellent observation that we should look at resolving because its currently not implemented consistently within the library.

rparolin avatar Nov 10 '20 21:11 rparolin

@rparolin Thanks. People are generally "dazed and confused" when they realize one can do C++ with no C++ exceptions. And arrive at the smaller and faster code.

IMHO, EASTL will benefit greatly clarifying itself, by improving small but critical "details" for situations when compiling and using it with or without C++ exceptions. Especially for teams on Windows. Conceptually that is solved by MS STL (and ATL decades before) quite simply. Again unknown to many.

There are a few key details. If you guys want please open an issue. I would be glad to explain. Once presented it might be easy to implement. And test.

ps: My bandwidth is far from allowing me to exercise the standard PR workflow, sorry.

DBJDBJ avatar Nov 11 '20 06:11 DBJDBJ

Clarification, you do not want customers to face this

warning : _HAS_EXCEPTIONS == 0, but _ATL_NO_EXCEPTIONS not defined?

Thus _ATL_NO_EXCEPTIONS should depend on _HAS_EXCEPTIONS.

AFAIK, _CPPUNWIND is not user-controllable.

DBJDBJ avatar Nov 13 '20 13:11 DBJDBJ