Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2007-06-14 10:33:57

"Richard Day" <richardvday_at_[hidden]> wrote

> Basically if boost is striving for header only libraries when ever
> possible(And that is my impression)

I don't think this is 100% correct. In my impression Boost is a combinatiom
of libraries produced by different people (or different groups of people).
Each library author has his/her only preference regarding splitting the code
between headers and source files.

> should there be unnamed namespace's
> being used at all ?

The main problem of unnamed namespaces in headers is the possibility of ODR
violation. Has anyone seen any compiler complain about this? In Typeof
library we specifically implement test cases to cause ODR violation (because
we do use unnamed namespaces in headers; only since they are hidden inside
macro definitions, we don't get inspection complains). No compiler
complains of any ODR so far.

Now, I don't know if this is an appropriate topic here, but I would question
the usefullness of the ODR itself. My main problem with it -- it
contradicts to quite useful, IMO, idiom, where a library author defines a
main template in his/her library as a customization point, and the users
provide specializations of this template (similar to virtual functions in
runtime world).


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