常用的详细命名空间是什么 [英] What is the detail namespace commonly used for
问题描述
在一些较大的项目或库(例如Eigen)中,您可以看到 internal
或 detail
。我明白 internal
有什么好处,但是细节
是什么常用的?是否有任何常见的惯例来分发代码到这样的命名空间(特别是在具有公共接口的库的情况下)?
In some of the larger projects or libraries (e.g. Eigen), you can see namespaces like internal
or detail
. I understand what is internal
good for, but what is detail
commonly used for? Is there any common convention for distributing code into namespaces like that (especially in case of libraries with public interface)?
推荐答案
调用 detail
通常以与名为 internal
相同的方式使用。它是在公共接口中不可见的或至少应被外部用户忽略的内部详细信息。
A namespace called detail
is typically used in just the same way as a namespace called internal
. It's for "internal details" that are not visible in the public interface or which, at least, should be ignored by external users.
这篇关于常用的详细命名空间是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!