Jip*_*ers 1 windows-runtime c++-cx
我有一个头文件定义了我想在我的代码中使用的一些结构.
public value struct HttpHeader
{
Platform::String^ mName;
Platform::String^ mValue;
};
typedef Platform::Collections::Vector<HttpHeader> HttpHeaders;
public value struct HttpRequestEvent
{
Platform::String^ mUri;
HttpHeaders^ mHeaders;
};
Run Code Online (Sandbox Code Playgroud)
当我构建这个时,我收到此错误:
error C3986: 'mHeaders': signature of public member contains native type 'std::equal_to<_Ty>'
with
[
_Ty=cpcpb::HttpHeader
] (SettingsServiceImpl.cpp)
Run Code Online (Sandbox Code Playgroud)
我在这里错过了什么?不是我使用C++/Cx的一切吗?
用Windows::Foundation::Collections::IVector而不是Platform::Collections::Vector.
要使用Platform::Collections::Vector你必须提供一个自定义比较器,它是equals运算符.
| 归档时间: |
|
| 查看次数: |
2450 次 |
| 最近记录: |