Replace Maybe with std::optional
With c++17, std::optional provides the functionality that Maybe
provided.
Bug: 183215655
Test: aapt2_tests
Change-Id: I62bb9c2fa4985dc5217a6ed153df92b85ad9a034
diff --git a/tools/aapt2/Source.h b/tools/aapt2/Source.h
index 92934c3..4f9369a 100644
--- a/tools/aapt2/Source.h
+++ b/tools/aapt2/Source.h
@@ -17,21 +17,20 @@
#ifndef AAPT_SOURCE_H
#define AAPT_SOURCE_H
+#include <optional>
#include <ostream>
#include <string>
#include "android-base/stringprintf.h"
#include "androidfw/StringPiece.h"
-#include "util/Maybe.h"
-
namespace aapt {
// Represents a file on disk. Used for logging and showing errors.
struct Source {
std::string path;
- Maybe<size_t> line;
- Maybe<std::string> archive;
+ std::optional<size_t> line;
+ std::optional<std::string> archive;
Source() = default;