後來大概上網看了一下,一直在想boost::tuple的命名概念,我想我以後再設計namespace時就按照這個一般的原則執行就好了。
The common principle is that domain libraries (like graph, python) should be on a separate subnamespace, while utility like libraries directly in the boost namespace.文章中也有提到tuple設計的結果
The final (I truly hope so) solution is now to have all definitions in namespace ::boost::tuples, and the most common names in the ::boost namespace as well. This is accomplished with using declarations (suggested by Dave Abrahams):namespace boost {
namespace tuples {
...
// All library code
...
}
using tuples::tuple;
using tuples::make_tuple;
using tuples::tie;
using tuples::get;
}