Closed ethanjli closed 3 years ago
Currently Util::get_byte<...> and Util::set_byte<...> seem to "wrap around" when byte_index is out of bounds. When byte_index is out of bounds, the function should instead fail a static assertion comparing it to sizeof(T).
Util::get_byte<...>
Util::set_byte<...>
byte_index
sizeof(T)
See also https://github.com/pez-globo/pufferfish-software/pull/366#discussion_r649634497 and https://github.com/pez-globo/pufferfish-software/pull/366#discussion_r649635495
Currently
Util::get_byte<...>
andUtil::set_byte<...>
seem to "wrap around" whenbyte_index
is out of bounds. Whenbyte_index
is out of bounds, the function should instead fail a static assertion comparing it tosizeof(T)
.See also https://github.com/pez-globo/pufferfish-software/pull/366#discussion_r649634497 and https://github.com/pez-globo/pufferfish-software/pull/366#discussion_r649635495