mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user