编辑开源库

Editing open-source libraries

我目前正在开发一个 C++ 库,以使我的 OpenGL 游戏开发团队的工作更轻松。我正在使用 GLM 来处理数学。

假设我适当地注明了原始创建者并在文件中保留了任何许可信息,是否可以重命名 GLM 名称空间以匹配我在我的库中使用的名称空间?这将使最终使用该库更加简洁,而不会向用户公开多个不同的 libraries/namespaces。

如果这不是 legal/ethical,我能做些什么来向命名空间添加别名并仅公开别名吗?

谢谢。

GLM License:

上面写着:

[...] to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software [...]

这是唯一的条件:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

还有一个限制:

By making use of the Software for military purposes, you choose to make a Bunny unhappy.

因此您可以根据需要重命名命名空间。

如果你关心兔子,请不要将其用于军事目的。

或者,您始终可以限定命名空间:

namespace myName{
    using namespace X;
}

这会使 myName::itemX::item

相同