\brief Return the raw bytes of the value in native-endian byte order.
| 215 | |
| 216 | /// \brief Return the raw bytes of the value in native-endian byte order. |
| 217 | std::array<uint8_t, kByteWidth> ToBytes() const { |
| 218 | std::array<uint8_t, kByteWidth> out{{0}}; |
| 219 | memcpy(out.data(), &value_, kByteWidth); |
| 220 | return out; |
| 221 | } |
| 222 | |
| 223 | /// \brief Copy the raw bytes of the value in native-endian byte order |
| 224 | void ToBytes(uint8_t* out) const { memcpy(out, &value_, kByteWidth); } |