-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Security 2019-04-08
ConstDataRange and friends are very useful types for working with buffers, but we haven't defined a consistent "byte" type across the code base, so there are a lot of reinterpret_casts to coerce a ConstDataRange from various range-types of bytes. We should just make it so you can construct a ConstDataRange from any "byte-like" type, that is an integral type where the size of the type is one. Also, make them constructable from any stl container of byte-like types, such as std::vector<uint8_t> or std::array<char, size>.