
16 Jan
2011
16 Jan
'11
9:55 a.m.
IMHO, simple libraries (such boost::mem_fn or boost::lexical_cast) which consist of a single .hpp file can (or must) be placed in main 'boost' directory, so user can write:
#include <boost/mem_fn.hpp>
For more complex libraries, all .hpp files must be placed in own directory (like boost::ptr_container), so user writes:
#include <boost/ptr_container/ptr_container.hpp>
I find useful to have the file that include all the other files at the boost directory level. As it is the case for Boost.Flyweight
#include <boost/flyweight.hpp>
Nod, agreed: having a simple "include everything" header at the top level can be very useful. We can still put everything in a sub-namespace (and IMO this should be the norm for new libraries). John.