
14 Apr
2008
14 Apr
'08
4:07 p.m.
Sebastian Redl:
I looked into GCC's language support library, but it seems that GCC doesn't store the copy constructor of the thrown object anywhere - neither in the exception header, nor in the type info. This is very unfortunate, since it means that a similar implementation is not possible for GCC.
Note that N2179 doesn't require a copy to be made. If GCC allocates the exception objects on a heap - I have some recollections that it was doing that but I may be wrong - it might still be possible to implement current_exception to return a pointer to the active exception object... if there's a way to insert a reference count somewhere inside.