diff --git a/tdutils/td/utils/Slice.h b/tdutils/td/utils/Slice.h index a9bc6a755..790e057e5 100644 --- a/tdutils/td/utils/Slice.h +++ b/tdutils/td/utils/Slice.h @@ -272,4 +272,13 @@ inline std::size_t SliceHash::operator()(Slice slice) const { return result; } +template +td::Slice as_slice(const td::UInt &value) { + return td::Slice(value.raw, N / 8); +} +template +td::MutableSlice as_slice(td::UInt &value) { + return td::MutableSlice(value.raw, N / 8); +} + } // namespace td