如何在thrift中跨命名空间访问变量

时间:2016-07-12 20:06:16

标签: c++ namespaces thrift

我们说我有两个文件

Something.thrift

namespace cpp something
struct Something { ... }

Marvelous.thrift

include "Something.thrift"
namespace cpp marvelous
struct IncludingSomething {
    1: required something::Something;
}

此处无法识别范围解析运算符,如何从Something访问Marvelous.thrift

1 个答案:

答案 0 :(得分:1)

使用dot运算符。所以喜欢这个

include "Something.thrift"
namespace cpp marvelous
struct IncludingSomething {
    1: required something.Something;
}