Upgrade WPILib and upgraded compilers to C++17
I haven't touched the CTRE libraries yet, although they may need to be
upgraded as well.
Note that this change makes it so that you need either Ubuntu 18.04 or
later or debian buster or later in order to build the code (you may be
able to build code for the roborio on older operating systems, but
running the tests will not work normally).
Change-Id: I0cfa37fe37f830edde6d305e1f50414c369098e4
diff --git a/aos/util/file.cc b/aos/util/file.cc
index f78239a..af1f85b 100644
--- a/aos/util/file.cc
+++ b/aos/util/file.cc
@@ -3,14 +3,15 @@
#include <fcntl.h>
#include <unistd.h>
-#include "absl/strings/string_view.h"
+#include <string_view>
+
#include "aos/scoped/scoped_fd.h"
#include "glog/logging.h"
namespace aos {
namespace util {
-::std::string ReadFileToStringOrDie(const absl::string_view filename) {
+::std::string ReadFileToStringOrDie(const std::string_view filename) {
::std::string r;
ScopedFD fd(open(::std::string(filename).c_str(), O_RDONLY));
PCHECK(fd.get() != -1) << ": opening " << filename;
@@ -26,8 +27,8 @@
return r;
}
-void WriteStringToFileOrDie(const absl::string_view filename,
- const absl::string_view contents) {
+void WriteStringToFileOrDie(const std::string_view filename,
+ const std::string_view contents) {
::std::string r;
ScopedFD fd(open(::std::string(filename).c_str(),
O_CREAT | O_WRONLY | O_TRUNC, S_IRWXU));