| 187 | } |
| 188 | |
| 189 | void BinaryContainer::writeString(size_type offset, const std::string& str) |
| 190 | { |
| 191 | if (buf_.size() <= offset || buf_.size() < offset + str.length()) |
| 192 | throw std::out_of_range("Invalid buffer range in binary container"); |
| 193 | |
| 194 | std::copy(str.cbegin(), str.cend(), buf_.begin() + static_cast<int>(offset)); |
| 195 | } |
| 196 | |
| 197 | int8_t BinaryContainer::readInt8(size_type offset) const |
| 198 | { |
no test coverage detected