Use wpi::span instead of wpi::ArrayRef across all libraries (#3414)

- Remove ArrayRef.h
- Add SpanExtras.h for a couple of convenience functions
This commit is contained in:
Peter Johnson
2021-06-06 19:51:14 -07:00
committed by GitHub
parent 2abbbd9e70
commit 64f5413253
167 changed files with 974 additions and 1433 deletions

View File

@@ -5,11 +5,12 @@
#ifndef WPIUTIL_WPI_RAW_UV_OSTREAM_H_
#define WPIUTIL_WPI_RAW_UV_OSTREAM_H_
#include <functional>
#include <utility>
#include "wpi/ArrayRef.h"
#include "wpi/SmallVector.h"
#include "wpi/raw_ostream.h"
#include "wpi/span.h"
#include "wpi/uv/Buffer.h"
namespace wpi {
@@ -47,9 +48,9 @@ class raw_uv_ostream : public raw_ostream {
~raw_uv_ostream() override = default;
/**
* Returns an ArrayRef to the buffers.
* Returns an span to the buffers.
*/
ArrayRef<uv::Buffer> bufs() { return m_bufs; }
span<uv::Buffer> bufs() { return m_bufs; }
void flush() = delete;