mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-03-02 14:36:16 +01:00
Specify temporary lvalue in option match
Fixes building on Windows
This commit is contained in:
@@ -117,7 +117,7 @@ template <typename T> class Option {
|
|||||||
|
|
||||||
// map
|
// map
|
||||||
template <typename F>
|
template <typename F>
|
||||||
auto map(F&& f) const -> Option<typename std::decay<decltype(f(*ptr()))>::type> {
|
auto map(F&& f) const& -> Option<typename std::decay<decltype(f(*ptr()))>::type> {
|
||||||
using U = typename std::decay<decltype(f(*ptr()))>::type;
|
using U = typename std::decay<decltype(f(*ptr()))>::type;
|
||||||
if (has_) {
|
if (has_) {
|
||||||
return Option<U>(f(*ptr()));
|
return Option<U>(f(*ptr()));
|
||||||
|
|||||||
Reference in New Issue
Block a user