
Anthony Williams wrote:
In any case, after further thought I remembered the reason I didn't do this before. If the exceptions are header-only then they cannot be thrown from a DLL and caught outside the DLL, since the type-ids won't match. This would mean that any exceptions thrown by the DLL version of boost.thread wouldn't be able to be caught in user code other than by catching std::exception or with catch(...). This is the case for MSVC/Windows anyway --- I'm not sure about other compilers/platforms.
Is it so? On which MSVC version? I'm asking because I throw/catch exceptions across dll boundaries all the time on Windows and haven't had any problems yet. There are some issues on Linux, but they are solved (more or less) with visibility tunings.