如何在节俭中跨命名空间访问变量
How to access variables across namespaces in thrift
假设我有两个文件
节俭的东西
namespace cpp something
struct Something { ... }
了不起,节俭
include "Something.thrift"
namespace cpp marvelous
struct IncludingSomething {
1: required something::Something;
}
这里无法识别范围解析运算符,如何从Marvelous.thrift
访问Something
?
使用 dot
运算符。 所以像这样
include "Something.thrift"
namespace cpp marvelous
struct IncludingSomething {
1: required something.Something;
}
相关文章:
- VS2017 是否更改了 C++ 中访问 C# 命名空间的方式?
- 如何访问嵌套在命名命名空间中的未命名命名空间变量?
- C++使用其他命名空间中的符号,而不使它们可从外部访问
- 访问向量字段的键 - 枚举类还是命名空间中的枚举?
- 将typeID转换为静态成员访问(C )的命名空间
- 如何使客户端无法访问命名空间的函数
- 从另一个命名空间访问标准命名空间数据成员
- 如何访问其他 .cc 文件中命名空间中定义的函数
- 使用命名空间和模板类访问变量
- 从另一个命名空间中C++全局命名空间访问
- 限制字段突变/对命名空间的访问
- 为什么std::generate在没有命名空间限定符的情况下是可访问的
- 为什么我的类友元函数无法访问具有命名空间的受保护成员?
- C++ 中的匿名命名空间无法访问标头
- C++访问具有相同名称的变量/对象的命名空间中的全局变量/对象
- 为什么命名空间中的某些函数可以在没有命名空间范围前缀的情况下访问
- 嵌套命名空间:从内部命名空间访问值
- 从命名空间访问映射
- 在c++中从父命名空间访问隐藏操作符
- 如何在节俭中跨命名空间访问变量