
30 Apr
2012
30 Apr
'12
6:02 p.m.
Exceptions types need to be exported so that shared libraries work correctly. Currently, the only code I see that does this is in Boost.Exception : #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility push (default) # endif #endif ... some exception type being declared or defined #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility pop # endif #endif But shouldn't we have macros to make this work with other compilers too? I'm not sure all unix-like compilers pretend to be GCC 4.1+.