Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-10-03 10:09:00


----- Original Message -----
From: "David Abrahams" <david.abrahams_at_[hidden]>

> For example, suppose I have a base class B and derived classes C and D,
each
> of which is defined and created in a shared library corresponding to its
> name (libB, libC, libD). Could I expect to successfully dynamic_cast a B*
to
> a C* or D* in code linked into any arbitrary one of these libraries, even
if
> B wasn't exported from libB?
>
> I can imagine implementations that would work, and others that wouldn't.
>
> I guess this only applies to platforms under which dynamic libraries can
> export things selectively (windows - anything else?)

On second thought, just modify the question above a bit, and it applies to
other systems:

   Could I expect to successfully dynamic_cast a B* to a C* or D*
   in code compiled into any arbitrary one of these libraries, even
   if libC and libD were not explicitly linked to libB?

===================================================
  David Abrahams, C++ library designer for hire
 resume: http://users.rcn.com/abrahams/resume.html

        C++ Booster (http://www.boost.org)
          email: david.abrahams_at_[hidden]
===================================================


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk