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/link/ReferenceLinker.h b/tools/aapt2/link/ReferenceLinker.h
index 770f1e5..b460853 100644
--- a/tools/aapt2/link/ReferenceLinker.h
+++ b/tools/aapt2/link/ReferenceLinker.h
@@ -97,11 +97,11 @@
// Resolves the attribute reference and returns an xml::AaptAttribute if successful.
// If resolution fails, outError holds the error message.
- static Maybe<xml::AaptAttribute> CompileXmlAttribute(const Reference& reference,
- const CallSite& callsite,
- IAaptContext* context,
- SymbolTable* symbols,
- std::string* out_error);
+ static std::optional<xml::AaptAttribute> CompileXmlAttribute(const Reference& reference,
+ const CallSite& callsite,
+ IAaptContext* context,
+ SymbolTable* symbols,
+ std::string* out_error);
// Writes the resource name to the DiagMessage, using the
// "orig_name (aka <transformed_name>)" syntax.