
On 5/15/07, Ulrich Eckhardt <doomster@knuut.de> wrote:
On Monday 14 May 2007 22:51:18 Piyo wrote:
[snip]
This is not specific to Boost at all. The point is that as soon as your plugin's interface depends on the version of another library you can't reliably use a different version thereof.
If you dont have any boost in namespace boost, but in different namespaces, e.g. boost_1_33_1, boost_1_34_0, then there is no problem at all. You can have the same translation unit using both versions of boost.
What does that mean in practice?
Example 1, working:
//interface void function(); //implementation void function() { // use Boost here }
The worst problem is that even the example 1 is not guaranteed to work. If whoevers use the function interface is using newer version of boost it will lead to ODR violations and very hard to track bugs. And it may even be that the user is not the same as the developer of function. And can't track different uses of boost.
[snipped]
As already said, this not only affects Boost, but also other libraries. For example if you replace the native standard library with a newer version, or with STLport, or if you then use the diagnostic version (special debug mode) you each time get different implemetations for std::string. Also, of course, the used compiler and possibly its settings make a difference.
The problem is that boost may be used as an implementation detail. But its use must be documented anyway and a version lock-in must occur. Which is desirable for a library developer.
Uli
Best regards, -- Felipe Magno de Almeida