Create a new modifiable buffer that is offset from the start of another. * @relates mutable_buffer */
| 649 | * @relates mutable_buffer |
| 650 | */ |
| 651 | inline mutable_buffer operator+(const mutable_buffer& b, |
| 652 | std::size_t n) ASIO_NOEXCEPT |
| 653 | { |
| 654 | std::size_t offset = n < b.size() ? n : b.size(); |
| 655 | char* new_data = static_cast<char*>(b.data()) + offset; |
| 656 | std::size_t new_size = b.size() - offset; |
| 657 | return mutable_buffer(new_data, new_size |
| 658 | #if defined(ASIO_ENABLE_BUFFER_DEBUGGING) |
| 659 | , b.get_debug_check() |
| 660 | #endif // ASIO_ENABLE_BUFFER_DEBUGGING |
| 661 | ); |
| 662 | } |
| 663 | |
| 664 | /// Create a new modifiable buffer that is offset from the start of another. |
| 665 | /** |
nothing calls this directly
no test coverage detected