
At 12:49 AM +0000 6/24/09, Lewis Hyatt wrote:
Let's say I want to compile and distribute a library (without the source), and I happen to use some boost header-only libraries as an implementation detail in some of my functions. None of the headers associated with my library include boost headers; it's purely an internal detail.
Now, it seems to me that users of my library will still have to be aware of the fact that I used boost in my implementation -- specifically, if they happen to use different versions of the same boost libraries in their code, then the ODR is violated and the behavior is undefined.
I recently dealt with a similar situation by using a linker version script that marked all of the boost related symbols in the library as local. See the binutils documentation for ld's --version-script option. Of course, this is gnu tool-chain specific, which may or may not be useful to you.