Alexander Grund wrote:
So how do you propose to setup a library such that exceptions can be caught by consumers of that library in a portable way?
All exceptions need to be BOOST_SYMBOL_VISIBLE, even in header-only libraries. Non-exception interface classes need to be _DECL if the library isn't header-only. The question is what needs to be done for exception classes that are also _DECL for some reason (e.g. their what() member function is in the compiled library.) It makes sense that everything EXPORTed/IMPORTed needs to also be VISIBLE; I can't think of any scenarios in which it doesn't need to be. So defining BOOST_SYMBOL_IMPORT to BOOST_SYMBOL_VISIBLE on non-Windows seems sensible. Others seem to disagree; I'm not sure what's the downside though.