
18.01.2011 18:50, Stewart, Robert пишет:
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> -1
The single header libraries still have documentation and tests which should all fall into library-specific subdirectories of their respective parents.
As noted elsewhere, boost/mem_fn.hpp can still exist, but it should simply include boost/<library>/mem_fn.hpp even though the latter may be the only header in boost/<library>.
Not only does this follow a consistent pattern, but it also leaves room for later additions should they appear.
Hm... Yes, you are right.
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> +1
Furthermore, the directory and namespace names should be identical. Thus, boost/ptr_container provides code in boost::ptr_container.
Yes, this is a good requirement, but, IMHO, this requirement should not be *mandatory* for all libraries. But... Perhaps it should be. I think it should be discussed in more detail. But important that as a result of this discussion was adopted by the standard one for all. - Denis