Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2021-02-02 14:21:10

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

Non-exception interface classes need to be _DECL if the library isn't

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

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.

Boost list run by bdawes at, gregod at, cpdaniel at, john at