[wpiutil] Remove STLExtras.h

This is a very inefficient header, and it's good to remove to discourage
its use.  Only a handful of use cases remained, and of only array_lengthof.
This commit is contained in:
Peter Johnson
2021-06-06 17:44:40 -07:00
parent 80f1d79218
commit 8d054c940c
7 changed files with 18 additions and 1318 deletions

View File

@@ -16,7 +16,6 @@
#endif
#include "wpi/raw_ostream.h"
#include "wpi/STLExtras.h"
#include "wpi/SmallString.h"
#include "wpi/SmallVector.h"
#include "wpi/StringExtras.h"
@@ -65,6 +64,14 @@
using namespace wpi;
namespace {
// Find the length of an array.
template <class T, std::size_t N>
constexpr inline size_t array_lengthof(T (&)[N]) {
return N;
}
} // namespace
raw_ostream::~raw_ostream() {
// raw_ostream's subclasses should take care to flush the buffer
// in their destructors.