Skip to content
  • Mark OLESEN's avatar
    ENH: add OListStream::swap(DynamicList<char>&) · 6f8da834
    Mark OLESEN authored
    - allows full recovery of allocated space, not just addressable range.
    
      This can be particularly useful for code patterns that repeatedly
      reuse the same buffer space. For example,
    
          DynamicList<char> buf(1024);
    
          // some loop
          {
              OListStream os(std::move(buf));
              os << ...
    
              os.swap(buf);
          }
    
       Can read back from this buffer as a second operation:
    
          {
              UIListStream is(buf);
              is >> ...
          }
    6f8da834