问题描述
以下标头是实际的,过于复杂的代码的简化版本。我需要在实现文件中将一个函数添加到与f()
相同的名称空间中。考虑到我不能直接使用V
,我该怎么做?。
谢谢。
// framework header file
namespace N
{
namespace V {} // not to be used outside header; use the alias below,instead
namespace VA = V; // using VA outside header is fine
using namespace V;
namespace V
{
void f();
}
}
// client impl file
namespace N
{
namespace V // not allowed
{
void g() // this must belong to N::V
{
//...
}
}
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)