mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
Add LLVM_VALUE_FUNCTION to Optional::map(); NFC
This is for future-proofing when compiling with MSVC once we drop support for 2017.
This commit is contained in:
parent
068346b51e
commit
047716a57a
@ -269,7 +269,7 @@ public:
|
||||
|
||||
/// Apply a function to the value if present; otherwise return None.
|
||||
template <class Function>
|
||||
auto map(const Function &F) const
|
||||
auto map(const Function &F) const LLVM_LVALUE_FUNCTION
|
||||
-> Optional<decltype(F(getValue()))> {
|
||||
if (*this) return F(getValue());
|
||||
return None;
|
||||
|
Loading…
Reference in New Issue
Block a user