How C++ exception handling (EH) works. With focus on type matching. (g++-4.8.2)

Dec 12, 2013 16:25

int main()
{
try { throw 1.0; }
catch (int x) { x = 0xdead; }
catch (float f) {f = 0xf00d; }
catch (char * c) { c = (char*)0xff; }
catch (...) {}

return 0;
}
How this works? First I move the sugar out of the way:
0000000000400850
Read more... )

Leave a comment

Comments 2

skif_by December 12 2013, 14:56:40 UTC
cottidianus December 12 2013, 15:11:31 UTC
ты попал в юникс тусовку, да

Reply


Leave a comment

Up