Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
Note that the `message` class now has a constructor allowing messages to be constructed from a similarly typed `header`. This handles the case where the user already has the header and wants to make a commitment to the type for [*Body]. A function can be declared which accepts any header:请注意,`message` 类现在拥有一个构造函数,允许从类型相同的 `header` 构造消息。这解决了用户已经拥有头部,并希望为 [*Body] 确定具体类型的情况。我们可以声明一个能够接受任意头部的函数: ``` template<bool isRequest, class Fields> void f(header<isRequest, Fields>& msg); ```