Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
The function [link beast.ref.boost__beast__buffers_range_ref `buffers_range`] maintains a copy of the buffer sequence, while [link beast.ref.boost__beast__buffers_range_ref `buffers_range_ref`] maintains a reference (in this case, the caller must ensure that the lifetime of the referenced buffer sequence extends until the range object is destroyed).
This function returns an iterable range representing the passed buffer sequence. The values obtained when iterating the range will always be a constant buffer, unless the underlying buffer sequence is mutable, in which case the value obtained when iterating will be a mutable buffer. It is intended as a notational convenience when writing a ['range-for] statement over a buffer sequence.
该函数用于返回一个表示所传入缓冲区序列的可迭代范围。迭代该范围时获取的值始终为常量缓冲区,除非底层缓冲区序列是可变的,此时迭代获取的值将变为可变缓冲区。该函数旨在为编写遍历缓冲区序列的 [范围 for] 语句提供便捷的语法表达。The function
[link beast.ref.boost__beast__buffers_range
_ref`buffers_range`]maintains a copy of the buffer sequence, while函数会保留缓冲区序列的副本,而 [link beast.ref.boost__beast__buffers_range_ref `buffers_range_ref`]maintains a reference (in this case, the caller must ensure that the lifetime of the referenced buffer sequence extends until the range object is destroyed).则只保留引用(此时调用方需确保被引用缓冲区序列的生命周期延续到该范围对象销毁为止)。