Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-40356

Make ConstDataRange and friends constructable from any byte-like type or container of byte-like types

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.10
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Security 2019-04-08

      Description

      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>.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: