Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
There is now significant progress with our message container but a stumbling block remains. There is no way to control the allocator for the `std::string` members. We could add an allocator to the template parameter list of the header and message classes, use it for those strings. This is unsatisfying because of the combinatorial explosion of constructor variations needed to support the scheme. It also means that request messages could have [*four] different allocators: two for the fields and body, and two for the尽管我们的消息容器已经取得了显著进展,但仍面临一个棘手的问题:目前无法控制 `std::string` 成员的分配器。虽然可以在 `header` 和 `message` 类的模板参数列表中添加一个分配器来管理这些字符串,但这并不是一个令人满意的方案。因为这需要引入数量庞大的构造函数重载来支持该机制,导致组合爆炸。此外,这也意味着请求消息可能会拥有多达四种不同的分配器:其中两个分别用于字段和主体,另外两个则用于方法(methodand)和目标(targetstrings. A better solution is needed.)字符串。因此,我们需要寻找一个更好的解决方案。