|
Boost : |
From: Andrey Semashev (andysem_at_[hidden])
Date: 2008-04-24 12:47:53
Vladimir Prus wrote:
> Sebastian Redl wrote:
>
>> What I'm saying is that I believe it to be very dangerous to have your
>> own application use Boost header-only libraries of one version and
>> precompiled libraries that link against other versions of the
>> header-only libraries. If components from the header-only version (say,
>> a shared_ptr or an any) are somehow transferred between the main
>> executable and the library, you're in great danger of crashing.
>
> This is not anything specific to header-only libraries. Classes that
> are in the public API, regardless of whether the actual implementation
> is defined inline, or compiled in a separate object file, should not
> change their layout in point releases, in my opinion.
The issues are not only limited with binary layout. ODR violation
problems show with functions too, since due to relocations your
application may end up using either old or new versions of them. It is
well possible to get a mixed set of them in the end. No need to say that
the functions may not behave well in such a zoo and you'll get a big can
of worms trying to debug the app. Whenever possible I, personally, try
to avoid such situation by all means.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk