CppCon 2017: Jody Hagins “Throwing Exceptions for Fun and Profit”

preview_player
Показать описание


Lightning Talk


*-----*
*-----*
Рекомендации по теме
Комментарии
Автор

I think this is a bit misguided.
The compiler throws over himself because of "char *", and that "for"(can't tell the compiler that the address won't change) and "to_upper"(can't tell the compiler that the data won't change) were intentionally added so you can't pass "const char *const" and allow the compiler to optimize it away(when you don't have exceptions).

It's like I would give you these 2 obviously misleading examples and tell you that it is a good example of why exceptions are bad:

aliancemd